Full Code of AxioDL/urde for AI

main 9a365f37f24b cached
1318 files
8.5 MB
2.3M tokens
9884 symbols
1 requests
Download .txt
Showing preview only (9,184K chars total). Download the full file or copy to clipboard to get everything.
Repository: AxioDL/urde
Branch: main
Commit: 9a365f37f24b
Files: 1318
Total size: 8.5 MB

Directory structure:
gitextract_10668kcv/

├── .clang-format
├── .clang-tidy
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── CMakePresets.json
├── LICENSE
├── NESEmulator/
│   ├── CMakeLists.txt
│   ├── CNESEmulator.cpp
│   ├── CNESEmulator.hpp
│   ├── apu.c
│   ├── malloc.h
│   └── ppu.c
├── README.md
├── Runtime/
│   ├── Audio/
│   │   ├── CAudioGroupSet.cpp
│   │   ├── CAudioGroupSet.hpp
│   │   ├── CAudioSys.cpp
│   │   ├── CAudioSys.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMidiManager.cpp
│   │   ├── CMidiManager.hpp
│   │   ├── CSfxManager.cpp
│   │   ├── CSfxManager.hpp
│   │   ├── CStaticAudioPlayer.cpp
│   │   ├── CStaticAudioPlayer.hpp
│   │   ├── CStreamAudioManager.cpp
│   │   ├── CStreamAudioManager.hpp
│   │   ├── SFX/
│   │   │   ├── Atomic.h
│   │   │   ├── BetaBeetle.h
│   │   │   ├── Bird.h
│   │   │   ├── BloodFlower.h
│   │   │   ├── Burrower.h
│   │   │   ├── ChozoGhost.h
│   │   │   ├── ChubbWeed.h
│   │   │   ├── CineBoots.h
│   │   │   ├── CineGeneral.h
│   │   │   ├── CineGun.h
│   │   │   ├── CineMorphball.h
│   │   │   ├── CineSuit.h
│   │   │   ├── CineVisor.h
│   │   │   ├── Crater.h
│   │   │   ├── Crystallite.h
│   │   │   ├── Drones.h
│   │   │   ├── EliteSpacePirate.h
│   │   │   ├── FireFlea.h
│   │   │   ├── Flaaghra.h
│   │   │   ├── FlickerBat.h
│   │   │   ├── FlyingPirate.h
│   │   │   ├── FrontEnd.h
│   │   │   ├── GagantuanBeatle.h
│   │   │   ├── Gnats.h
│   │   │   ├── Gryzbee.h
│   │   │   ├── IceCrack.h
│   │   │   ├── IceWorld.h
│   │   │   ├── InjuredPirates.h
│   │   │   ├── IntroBoss.h
│   │   │   ├── IntroWorld.h
│   │   │   ├── JellyZap.h
│   │   │   ├── LavaWorld.h
│   │   │   ├── Magdolite.h
│   │   │   ├── Metaree.h
│   │   │   ├── Metroid.h
│   │   │   ├── MetroidPrime.h
│   │   │   ├── MinesWorld.h
│   │   │   ├── Misc.h
│   │   │   ├── MiscSamus.h
│   │   │   ├── OmegaPirate.h
│   │   │   ├── OverWorld.h
│   │   │   ├── Parasite.h
│   │   │   ├── Phazon.h
│   │   │   ├── PhazonGun.h
│   │   │   ├── PuddleSpore.h
│   │   │   ├── PuddleToad.h
│   │   │   ├── Puffer.h
│   │   │   ├── ReactorDoor.h
│   │   │   ├── Ridley.h
│   │   │   ├── Ripper.h
│   │   │   ├── RuinsWorld.h
│   │   │   ├── SFX.h
│   │   │   ├── SamusShip.h
│   │   │   ├── Scarab.h
│   │   │   ├── Seedling.h
│   │   │   ├── SheeGoth.h
│   │   │   ├── SnakeWeed.h
│   │   │   ├── Sova.h
│   │   │   ├── SpacePirate.h
│   │   │   ├── SpankWeed.h
│   │   │   ├── Thardus.h
│   │   │   ├── TheEnd.h
│   │   │   ├── Torobyte.h
│   │   │   ├── Triclops.h
│   │   │   ├── Turret.h
│   │   │   ├── UI.h
│   │   │   ├── WarWasp.h
│   │   │   ├── Weapons.h
│   │   │   ├── ZZZ.h
│   │   │   ├── Zoomer.h
│   │   │   ├── lumigek.h
│   │   │   └── test.h
│   │   ├── g721.c
│   │   └── g721.h
│   ├── AutoMapper/
│   │   ├── CAutoMapper.cpp
│   │   ├── CAutoMapper.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMapArea.cpp
│   │   ├── CMapArea.hpp
│   │   ├── CMapUniverse.cpp
│   │   ├── CMapUniverse.hpp
│   │   ├── CMapWorld.cpp
│   │   ├── CMapWorld.hpp
│   │   ├── CMapWorldInfo.cpp
│   │   ├── CMapWorldInfo.hpp
│   │   ├── CMappableObject.cpp
│   │   └── CMappableObject.hpp
│   ├── CArchitectureMessage.hpp
│   ├── CArchitectureQueue.hpp
│   ├── CBasics.hpp
│   ├── CBasicsPC.cpp
│   ├── CCRC32.cpp
│   ├── CCRC32.hpp
│   ├── CDependencyGroup.cpp
│   ├── CDependencyGroup.hpp
│   ├── CDvdFile.cpp
│   ├── CDvdFile.hpp
│   ├── CDvdRequest.hpp
│   ├── CFactoryMgr.cpp
│   ├── CFactoryMgr.hpp
│   ├── CGameAllocator.cpp
│   ├── CGameAllocator.hpp
│   ├── CGameDebug.hpp
│   ├── CGameHintInfo.cpp
│   ├── CGameHintInfo.hpp
│   ├── CGameOptions.cpp
│   ├── CGameOptions.hpp
│   ├── CGameState.cpp
│   ├── CGameState.hpp
│   ├── CIOWin.hpp
│   ├── CIOWinManager.cpp
│   ├── CIOWinManager.hpp
│   ├── CInGameTweakManagerBase.hpp
│   ├── CInfiniteLoopDetector.cpp
│   ├── CInfiniteLoopDetector.hpp
│   ├── CMFGameBase.hpp
│   ├── CMain.cpp
│   ├── CMainFlowBase.cpp
│   ├── CMainFlowBase.hpp
│   ├── CMakeLists.txt
│   ├── CMayaSpline.cpp
│   ├── CMayaSpline.hpp
│   ├── CMemoryCardSys.cpp
│   ├── CMemoryCardSys.hpp
│   ├── CMemoryCardSysNix.cpp
│   ├── CMemoryCardSysOSX.cpp
│   ├── CMemoryCardSysWin.cpp
│   ├── CObjectList.cpp
│   ├── CObjectList.hpp
│   ├── CPakFile.cpp
│   ├── CPakFile.hpp
│   ├── CPlayerState.cpp
│   ├── CPlayerState.hpp
│   ├── CRandom16.cpp
│   ├── CRandom16.hpp
│   ├── CResFactory.cpp
│   ├── CResFactory.hpp
│   ├── CResLoader.cpp
│   ├── CResLoader.hpp
│   ├── CResourceNameDatabase.cpp
│   ├── CResourceNameDatabase.hpp
│   ├── CScannableObjectInfo.cpp
│   ├── CScannableObjectInfo.hpp
│   ├── CScriptMailbox.cpp
│   ├── CScriptMailbox.hpp
│   ├── CSimplePool.cpp
│   ├── CSimplePool.hpp
│   ├── CSortedLists.cpp
│   ├── CSortedLists.hpp
│   ├── CStateManager.cpp
│   ├── CStateManager.hpp
│   ├── CStaticInterference.cpp
│   ├── CStaticInterference.hpp
│   ├── CStopwatch.cpp
│   ├── CStopwatch.hpp
│   ├── CStringExtras.cpp
│   ├── CStringExtras.hpp
│   ├── CTextureCache.cpp
│   ├── CTextureCache.hpp
│   ├── CTimeProvider.cpp
│   ├── CTimeProvider.hpp
│   ├── CToken.cpp
│   ├── CToken.hpp
│   ├── CWorldSaveGameInfo.cpp
│   ├── CWorldSaveGameInfo.hpp
│   ├── Camera/
│   │   ├── CBallCamera.cpp
│   │   ├── CBallCamera.hpp
│   │   ├── CCameraFilter.cpp
│   │   ├── CCameraFilter.hpp
│   │   ├── CCameraManager.cpp
│   │   ├── CCameraManager.hpp
│   │   ├── CCameraShakeData.cpp
│   │   ├── CCameraShakeData.hpp
│   │   ├── CCameraSpline.cpp
│   │   ├── CCameraSpline.hpp
│   │   ├── CCinematicCamera.cpp
│   │   ├── CCinematicCamera.hpp
│   │   ├── CFirstPersonCamera.cpp
│   │   ├── CFirstPersonCamera.hpp
│   │   ├── CGameCamera.cpp
│   │   ├── CGameCamera.hpp
│   │   ├── CInterpolationCamera.cpp
│   │   ├── CInterpolationCamera.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CPathCamera.cpp
│   │   └── CPathCamera.hpp
│   ├── Character/
│   │   ├── CActorLights.cpp
│   │   ├── CActorLights.hpp
│   │   ├── CAdditiveAnimPlayback.cpp
│   │   ├── CAdditiveAnimPlayback.hpp
│   │   ├── CAdditiveBodyState.cpp
│   │   ├── CAdditiveBodyState.hpp
│   │   ├── CAllFormatsAnimSource.cpp
│   │   ├── CAllFormatsAnimSource.hpp
│   │   ├── CAnimCharacterSet.cpp
│   │   ├── CAnimCharacterSet.hpp
│   │   ├── CAnimData.cpp
│   │   ├── CAnimData.hpp
│   │   ├── CAnimPOIData.cpp
│   │   ├── CAnimPOIData.hpp
│   │   ├── CAnimPerSegmentData.hpp
│   │   ├── CAnimPlaybackParms.hpp
│   │   ├── CAnimSource.cpp
│   │   ├── CAnimSource.hpp
│   │   ├── CAnimSourceReader.cpp
│   │   ├── CAnimSourceReader.hpp
│   │   ├── CAnimSysContext.hpp
│   │   ├── CAnimTreeAnimReaderContainer.cpp
│   │   ├── CAnimTreeAnimReaderContainer.hpp
│   │   ├── CAnimTreeBlend.cpp
│   │   ├── CAnimTreeBlend.hpp
│   │   ├── CAnimTreeDoubleChild.cpp
│   │   ├── CAnimTreeDoubleChild.hpp
│   │   ├── CAnimTreeLoopIn.cpp
│   │   ├── CAnimTreeLoopIn.hpp
│   │   ├── CAnimTreeNode.cpp
│   │   ├── CAnimTreeNode.hpp
│   │   ├── CAnimTreeSequence.cpp
│   │   ├── CAnimTreeSequence.hpp
│   │   ├── CAnimTreeSingleChild.cpp
│   │   ├── CAnimTreeSingleChild.hpp
│   │   ├── CAnimTreeTimeScale.cpp
│   │   ├── CAnimTreeTimeScale.hpp
│   │   ├── CAnimTreeTransition.cpp
│   │   ├── CAnimTreeTransition.hpp
│   │   ├── CAnimTreeTweenBase.cpp
│   │   ├── CAnimTreeTweenBase.hpp
│   │   ├── CAnimation.cpp
│   │   ├── CAnimation.hpp
│   │   ├── CAnimationDatabase.hpp
│   │   ├── CAnimationDatabaseGame.cpp
│   │   ├── CAnimationDatabaseGame.hpp
│   │   ├── CAnimationManager.cpp
│   │   ├── CAnimationManager.hpp
│   │   ├── CAnimationSet.cpp
│   │   ├── CAnimationSet.hpp
│   │   ├── CAssetFactory.cpp
│   │   ├── CAssetFactory.hpp
│   │   ├── CBodyController.cpp
│   │   ├── CBodyController.hpp
│   │   ├── CBodyState.cpp
│   │   ├── CBodyState.hpp
│   │   ├── CBodyStateCmdMgr.cpp
│   │   ├── CBodyStateCmdMgr.hpp
│   │   ├── CBodyStateInfo.cpp
│   │   ├── CBodyStateInfo.hpp
│   │   ├── CBoneTracking.cpp
│   │   ├── CBoneTracking.hpp
│   │   ├── CBoolPOINode.cpp
│   │   ├── CBoolPOINode.hpp
│   │   ├── CCharAnimTime.cpp
│   │   ├── CCharAnimTime.hpp
│   │   ├── CCharLayoutInfo.cpp
│   │   ├── CCharLayoutInfo.hpp
│   │   ├── CCharacterFactory.cpp
│   │   ├── CCharacterFactory.hpp
│   │   ├── CCharacterInfo.cpp
│   │   ├── CCharacterInfo.hpp
│   │   ├── CCharacterSet.cpp
│   │   ├── CCharacterSet.hpp
│   │   ├── CEffectComponent.cpp
│   │   ├── CEffectComponent.hpp
│   │   ├── CFBStreamedAnimReader.cpp
│   │   ├── CFBStreamedAnimReader.hpp
│   │   ├── CFBStreamedCompression.cpp
│   │   ├── CFBStreamedCompression.hpp
│   │   ├── CGroundMovement.cpp
│   │   ├── CGroundMovement.hpp
│   │   ├── CHalfTransition.cpp
│   │   ├── CHalfTransition.hpp
│   │   ├── CHierarchyPoseBuilder.cpp
│   │   ├── CHierarchyPoseBuilder.hpp
│   │   ├── CIkChain.cpp
│   │   ├── CIkChain.hpp
│   │   ├── CInt32POINode.cpp
│   │   ├── CInt32POINode.hpp
│   │   ├── CLayoutDescription.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMetaAnimBlend.cpp
│   │   ├── CMetaAnimBlend.hpp
│   │   ├── CMetaAnimFactory.cpp
│   │   ├── CMetaAnimFactory.hpp
│   │   ├── CMetaAnimPhaseBlend.cpp
│   │   ├── CMetaAnimPhaseBlend.hpp
│   │   ├── CMetaAnimPlay.cpp
│   │   ├── CMetaAnimPlay.hpp
│   │   ├── CMetaAnimRandom.cpp
│   │   ├── CMetaAnimRandom.hpp
│   │   ├── CMetaAnimSequence.cpp
│   │   ├── CMetaAnimSequence.hpp
│   │   ├── CMetaTransFactory.cpp
│   │   ├── CMetaTransFactory.hpp
│   │   ├── CMetaTransMetaAnim.cpp
│   │   ├── CMetaTransMetaAnim.hpp
│   │   ├── CMetaTransPhaseTrans.cpp
│   │   ├── CMetaTransPhaseTrans.hpp
│   │   ├── CMetaTransSnap.cpp
│   │   ├── CMetaTransSnap.hpp
│   │   ├── CMetaTransTrans.cpp
│   │   ├── CMetaTransTrans.hpp
│   │   ├── CModelData.cpp
│   │   ├── CModelData.hpp
│   │   ├── CPASAnimInfo.cpp
│   │   ├── CPASAnimInfo.hpp
│   │   ├── CPASAnimParm.hpp
│   │   ├── CPASAnimParmData.cpp
│   │   ├── CPASAnimParmData.hpp
│   │   ├── CPASAnimState.cpp
│   │   ├── CPASAnimState.hpp
│   │   ├── CPASDatabase.cpp
│   │   ├── CPASDatabase.hpp
│   │   ├── CPASParmInfo.cpp
│   │   ├── CPASParmInfo.hpp
│   │   ├── CPOINode.cpp
│   │   ├── CPOINode.hpp
│   │   ├── CParticleData.cpp
│   │   ├── CParticleData.hpp
│   │   ├── CParticleDatabase.cpp
│   │   ├── CParticleDatabase.hpp
│   │   ├── CParticleGenInfo.cpp
│   │   ├── CParticleGenInfo.hpp
│   │   ├── CParticlePOINode.cpp
│   │   ├── CParticlePOINode.hpp
│   │   ├── CPoseAsTransforms.cpp
│   │   ├── CPoseAsTransforms.hpp
│   │   ├── CPrimitive.cpp
│   │   ├── CPrimitive.hpp
│   │   ├── CRagDoll.cpp
│   │   ├── CRagDoll.hpp
│   │   ├── CSegId.hpp
│   │   ├── CSegIdList.cpp
│   │   ├── CSegIdList.hpp
│   │   ├── CSegStatementSet.cpp
│   │   ├── CSegStatementSet.hpp
│   │   ├── CSequenceHelper.cpp
│   │   ├── CSequenceHelper.hpp
│   │   ├── CSkinRules.cpp
│   │   ├── CSkinRules.hpp
│   │   ├── CSoundPOINode.cpp
│   │   ├── CSoundPOINode.hpp
│   │   ├── CSteeringBehaviors.cpp
│   │   ├── CSteeringBehaviors.hpp
│   │   ├── CTimeScaleFunctions.cpp
│   │   ├── CTimeScaleFunctions.hpp
│   │   ├── CTransition.cpp
│   │   ├── CTransition.hpp
│   │   ├── CTransitionDatabase.hpp
│   │   ├── CTransitionDatabaseGame.cpp
│   │   ├── CTransitionDatabaseGame.hpp
│   │   ├── CTransitionManager.cpp
│   │   ├── CTransitionManager.hpp
│   │   ├── CTreeUtils.cpp
│   │   ├── CTreeUtils.hpp
│   │   ├── CharacterCommon.cpp
│   │   ├── CharacterCommon.hpp
│   │   ├── IAnimReader.cpp
│   │   ├── IAnimReader.hpp
│   │   ├── IMetaAnim.cpp
│   │   ├── IMetaAnim.hpp
│   │   ├── IMetaTrans.hpp
│   │   ├── IVaryingAnimationTimeScale.hpp
│   │   └── TSegIdMap.hpp
│   ├── Collision/
│   │   ├── CAABoxFilter.cpp
│   │   ├── CAABoxFilter.hpp
│   │   ├── CAreaOctTree.cpp
│   │   ├── CAreaOctTree.hpp
│   │   ├── CBallFilter.cpp
│   │   ├── CBallFilter.hpp
│   │   ├── CCollidableAABox.cpp
│   │   ├── CCollidableAABox.hpp
│   │   ├── CCollidableCollisionSurface.cpp
│   │   ├── CCollidableCollisionSurface.hpp
│   │   ├── CCollidableOBBTree.cpp
│   │   ├── CCollidableOBBTree.hpp
│   │   ├── CCollidableOBBTreeGroup.cpp
│   │   ├── CCollidableOBBTreeGroup.hpp
│   │   ├── CCollidableSphere.cpp
│   │   ├── CCollidableSphere.hpp
│   │   ├── CCollisionActor.cpp
│   │   ├── CCollisionActor.hpp
│   │   ├── CCollisionActorManager.cpp
│   │   ├── CCollisionActorManager.hpp
│   │   ├── CCollisionEdge.cpp
│   │   ├── CCollisionEdge.hpp
│   │   ├── CCollisionInfo.cpp
│   │   ├── CCollisionInfo.hpp
│   │   ├── CCollisionInfoList.hpp
│   │   ├── CCollisionPrimitive.cpp
│   │   ├── CCollisionPrimitive.hpp
│   │   ├── CCollisionResponseData.cpp
│   │   ├── CCollisionResponseData.hpp
│   │   ├── CCollisionSurface.cpp
│   │   ├── CCollisionSurface.hpp
│   │   ├── CGameCollision.cpp
│   │   ├── CGameCollision.hpp
│   │   ├── CInternalRayCastStructure.hpp
│   │   ├── CJointCollisionDescription.cpp
│   │   ├── CJointCollisionDescription.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMaterialFilter.cpp
│   │   ├── CMaterialFilter.hpp
│   │   ├── CMaterialList.hpp
│   │   ├── CMetroidAreaCollider.cpp
│   │   ├── CMetroidAreaCollider.hpp
│   │   ├── COBBTree.cpp
│   │   ├── COBBTree.hpp
│   │   ├── CRayCastResult.cpp
│   │   ├── CRayCastResult.hpp
│   │   ├── CollisionUtil.cpp
│   │   ├── CollisionUtil.hpp
│   │   ├── ICollisionFilter.hpp
│   │   ├── InternalColliders.cpp
│   │   └── InternalColliders.hpp
│   ├── ConsoleVariables/
│   │   ├── CVar.cpp
│   │   ├── CVar.hpp
│   │   ├── CVarCommons.cpp
│   │   ├── CVarCommons.hpp
│   │   ├── CVarManager.cpp
│   │   ├── CVarManager.hpp
│   │   ├── FileStoreManager.cpp
│   │   └── FileStoreManager.hpp
│   ├── Flags.hpp
│   ├── Formatting.hpp
│   ├── GCNTypes.hpp
│   ├── GameGlobalObjects.cpp
│   ├── GameGlobalObjects.hpp
│   ├── GameObjectLists.cpp
│   ├── GameObjectLists.hpp
│   ├── Graphics/
│   │   ├── CCubeMaterial.cpp
│   │   ├── CCubeMaterial.hpp
│   │   ├── CCubeModel.cpp
│   │   ├── CCubeModel.hpp
│   │   ├── CCubeRenderer.cpp
│   │   ├── CCubeRenderer.hpp
│   │   ├── CCubeSurface.cpp
│   │   ├── CCubeSurface.hpp
│   │   ├── CDrawable.hpp
│   │   ├── CDrawablePlaneObject.hpp
│   │   ├── CFont.cpp
│   │   ├── CFont.hpp
│   │   ├── CGX.cpp
│   │   ├── CGX.hpp
│   │   ├── CGraphics.cpp
│   │   ├── CGraphics.hpp
│   │   ├── CGraphicsPalette.cpp
│   │   ├── CGraphicsPalette.hpp
│   │   ├── CLight.cpp
│   │   ├── CLight.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMetroidModelInstance.cpp
│   │   ├── CMetroidModelInstance.hpp
│   │   ├── CModel.cpp
│   │   ├── CModel.hpp
│   │   ├── CMoviePlayer.cpp
│   │   ├── CMoviePlayer.hpp
│   │   ├── CPVSAreaSet.cpp
│   │   ├── CPVSAreaSet.hpp
│   │   ├── CPVSVisOctree.cpp
│   │   ├── CPVSVisOctree.hpp
│   │   ├── CPVSVisSet.cpp
│   │   ├── CPVSVisSet.hpp
│   │   ├── CRainSplashGenerator.cpp
│   │   ├── CRainSplashGenerator.hpp
│   │   ├── CSimpleShadow.cpp
│   │   ├── CSimpleShadow.hpp
│   │   ├── CSkinnedModel.cpp
│   │   ├── CSkinnedModel.hpp
│   │   ├── CTevCombiners.cpp
│   │   ├── CTevCombiners.hpp
│   │   ├── CTexture.cpp
│   │   ├── CTexture.hpp
│   │   ├── CVertexMorphEffect.cpp
│   │   ├── CVertexMorphEffect.hpp
│   │   ├── GX.hpp
│   │   ├── IRenderer.hpp
│   │   ├── IWeaponRenderer.cpp
│   │   └── IWeaponRenderer.hpp
│   ├── GuiSys/
│   │   ├── CAuiEnergyBarT01.cpp
│   │   ├── CAuiEnergyBarT01.hpp
│   │   ├── CAuiImagePane.cpp
│   │   ├── CAuiImagePane.hpp
│   │   ├── CAuiMeter.cpp
│   │   ├── CAuiMeter.hpp
│   │   ├── CCompoundTargetReticle.cpp
│   │   ├── CCompoundTargetReticle.hpp
│   │   ├── CConsoleOutputWindow.cpp
│   │   ├── CConsoleOutputWindow.hpp
│   │   ├── CDrawStringOptions.hpp
│   │   ├── CErrorOutputWindow.cpp
│   │   ├── CErrorOutputWindow.hpp
│   │   ├── CFontImageDef.cpp
│   │   ├── CFontImageDef.hpp
│   │   ├── CFontRenderState.cpp
│   │   ├── CFontRenderState.hpp
│   │   ├── CGuiCamera.cpp
│   │   ├── CGuiCamera.hpp
│   │   ├── CGuiCompoundWidget.cpp
│   │   ├── CGuiCompoundWidget.hpp
│   │   ├── CGuiFrame.cpp
│   │   ├── CGuiFrame.hpp
│   │   ├── CGuiGroup.cpp
│   │   ├── CGuiGroup.hpp
│   │   ├── CGuiHeadWidget.cpp
│   │   ├── CGuiHeadWidget.hpp
│   │   ├── CGuiLight.cpp
│   │   ├── CGuiLight.hpp
│   │   ├── CGuiModel.cpp
│   │   ├── CGuiModel.hpp
│   │   ├── CGuiObject.cpp
│   │   ├── CGuiObject.hpp
│   │   ├── CGuiPane.cpp
│   │   ├── CGuiPane.hpp
│   │   ├── CGuiSliderGroup.cpp
│   │   ├── CGuiSliderGroup.hpp
│   │   ├── CGuiSys.cpp
│   │   ├── CGuiSys.hpp
│   │   ├── CGuiTableGroup.cpp
│   │   ├── CGuiTableGroup.hpp
│   │   ├── CGuiTextPane.cpp
│   │   ├── CGuiTextPane.hpp
│   │   ├── CGuiTextSupport.cpp
│   │   ├── CGuiTextSupport.hpp
│   │   ├── CGuiWidget.cpp
│   │   ├── CGuiWidget.hpp
│   │   ├── CGuiWidgetDrawParms.hpp
│   │   ├── CGuiWidgetIdDB.cpp
│   │   ├── CGuiWidgetIdDB.hpp
│   │   ├── CHudBallInterface.cpp
│   │   ├── CHudBallInterface.hpp
│   │   ├── CHudBossEnergyInterface.cpp
│   │   ├── CHudBossEnergyInterface.hpp
│   │   ├── CHudDecoInterface.cpp
│   │   ├── CHudDecoInterface.hpp
│   │   ├── CHudEnergyInterface.cpp
│   │   ├── CHudEnergyInterface.hpp
│   │   ├── CHudFreeLookInterface.cpp
│   │   ├── CHudFreeLookInterface.hpp
│   │   ├── CHudHelmetInterface.cpp
│   │   ├── CHudHelmetInterface.hpp
│   │   ├── CHudInterface.hpp
│   │   ├── CHudMissileInterface.cpp
│   │   ├── CHudMissileInterface.hpp
│   │   ├── CHudRadarInterface.cpp
│   │   ├── CHudRadarInterface.hpp
│   │   ├── CHudThreatInterface.cpp
│   │   ├── CHudThreatInterface.hpp
│   │   ├── CHudVisorBeamMenu.cpp
│   │   ├── CHudVisorBeamMenu.hpp
│   │   ├── CInstruction.cpp
│   │   ├── CInstruction.hpp
│   │   ├── CMakeLists.txt
│   │   ├── COrbitPointMarker.cpp
│   │   ├── COrbitPointMarker.hpp
│   │   ├── CRasterFont.cpp
│   │   ├── CRasterFont.hpp
│   │   ├── CSaveableState.cpp
│   │   ├── CSaveableState.hpp
│   │   ├── CScanDisplay.cpp
│   │   ├── CScanDisplay.hpp
│   │   ├── CSplashScreen.cpp
│   │   ├── CSplashScreen.hpp
│   │   ├── CStringTable.cpp
│   │   ├── CStringTable.hpp
│   │   ├── CTargetingManager.cpp
│   │   ├── CTargetingManager.hpp
│   │   ├── CTextExecuteBuffer.cpp
│   │   ├── CTextExecuteBuffer.hpp
│   │   ├── CTextParser.cpp
│   │   ├── CTextParser.hpp
│   │   ├── CTextRenderBuffer.cpp
│   │   ├── CTextRenderBuffer.hpp
│   │   ├── CWordBreakTables.cpp
│   │   └── CWordBreakTables.hpp
│   ├── IFactory.hpp
│   ├── IMain.hpp
│   ├── IObj.hpp
│   ├── IObjFactory.hpp
│   ├── IObjectStore.hpp
│   ├── IRuntimeMain.hpp
│   ├── IVParamObj.hpp
│   ├── ImGuiConsole.cpp
│   ├── ImGuiConsole.hpp
│   ├── ImGuiControllerConfig.cpp
│   ├── ImGuiControllerConfig.hpp
│   ├── ImGuiEntitySupport.cpp
│   ├── ImGuiEntitySupport.hpp
│   ├── ImGuiPlayerLoadouts.cpp
│   ├── ImGuiPlayerLoadouts.hpp
│   ├── Input/
│   │   ├── CControllerAxis.hpp
│   │   ├── CControllerButton.hpp
│   │   ├── CControllerGamepadData.cpp
│   │   ├── CControllerGamepadData.hpp
│   │   ├── CDolphinController.cpp
│   │   ├── CDolphinController.hpp
│   │   ├── CFinalInput.cpp
│   │   ├── CFinalInput.hpp
│   │   ├── CInputGenerator.cpp
│   │   ├── CInputGenerator.cpp.old
│   │   ├── CInputGenerator.hpp
│   │   ├── CInputGenerator.hpp.old
│   │   ├── CKeyboardMouseController.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CRumbleGenerator.cpp
│   │   ├── CRumbleGenerator.hpp
│   │   ├── CRumbleManager.cpp
│   │   ├── CRumbleManager.hpp
│   │   ├── CRumbleVoice.cpp
│   │   ├── CRumbleVoice.hpp
│   │   ├── ControlMapper.cpp
│   │   ├── ControlMapper.hpp
│   │   ├── DolphinIController.cpp
│   │   ├── IController.hpp
│   │   ├── InputTypes.hpp
│   │   ├── RumbleFxTable.cpp
│   │   └── RumbleFxTable.hpp
│   ├── Logging.hpp
│   ├── MP1/
│   │   ├── CArtifactDoll.cpp
│   │   ├── CArtifactDoll.hpp
│   │   ├── CAudioStateWin.cpp
│   │   ├── CAudioStateWin.hpp
│   │   ├── CAutoSave.cpp
│   │   ├── CAutoSave.hpp
│   │   ├── CCredits.cpp
│   │   ├── CCredits.hpp
│   │   ├── CFaceplateDecoration.cpp
│   │   ├── CFaceplateDecoration.hpp
│   │   ├── CFrontEndUI.cpp
│   │   ├── CFrontEndUI.hpp
│   │   ├── CGBASupport.cpp
│   │   ├── CGBASupport.hpp
│   │   ├── CGameCubeDoll.cpp
│   │   ├── CGameCubeDoll.hpp
│   │   ├── CInGameGuiManager.cpp
│   │   ├── CInGameGuiManager.hpp
│   │   ├── CInGameGuiManagerCommon.hpp
│   │   ├── CInGameTweakManager.hpp
│   │   ├── CInventoryScreen.cpp
│   │   ├── CInventoryScreen.hpp
│   │   ├── CLogBookScreen.cpp
│   │   ├── CLogBookScreen.hpp
│   │   ├── CMFGame.cpp
│   │   ├── CMFGame.hpp
│   │   ├── CMainFlow.cpp
│   │   ├── CMainFlow.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMemoryCardDriver.cpp
│   │   ├── CMemoryCardDriver.hpp
│   │   ├── CMessageScreen.cpp
│   │   ├── CMessageScreen.hpp
│   │   ├── COptionsScreen.cpp
│   │   ├── COptionsScreen.hpp
│   │   ├── CPauseScreen.cpp
│   │   ├── CPauseScreen.hpp
│   │   ├── CPauseScreenBase.cpp
│   │   ├── CPauseScreenBase.hpp
│   │   ├── CPauseScreenBlur.cpp
│   │   ├── CPauseScreenBlur.hpp
│   │   ├── CPlayMovie.cpp
│   │   ├── CPlayMovie.hpp
│   │   ├── CPlayerVisor.cpp
│   │   ├── CPlayerVisor.hpp
│   │   ├── CPreFrontEnd.cpp
│   │   ├── CPreFrontEnd.hpp
│   │   ├── CQuitGameScreen.cpp
│   │   ├── CQuitGameScreen.hpp
│   │   ├── CSamusDoll.cpp
│   │   ├── CSamusDoll.hpp
│   │   ├── CSamusFaceReflection.cpp
│   │   ├── CSamusFaceReflection.hpp
│   │   ├── CSamusHud.cpp
│   │   ├── CSamusHud.hpp
│   │   ├── CSaveGameScreen.cpp
│   │   ├── CSaveGameScreen.hpp
│   │   ├── CSlideShow.cpp
│   │   ├── CSlideShow.hpp
│   │   ├── CSplashScreen.cpp
│   │   ├── CSplashScreen.hpp
│   │   ├── CStateSetterFlow.cpp
│   │   ├── CStateSetterFlow.hpp
│   │   ├── CTweaks.cpp
│   │   ├── CTweaks.hpp
│   │   ├── MP1.cpp
│   │   ├── MP1.hpp
│   │   ├── Tweaks/
│   │   │   ├── CTweakAutoMapper.cpp
│   │   │   ├── CTweakAutoMapper.hpp
│   │   │   ├── CTweakBall.cpp
│   │   │   ├── CTweakBall.hpp
│   │   │   ├── CTweakGame.cpp
│   │   │   ├── CTweakGame.hpp
│   │   │   ├── CTweakGui.cpp
│   │   │   ├── CTweakGui.hpp
│   │   │   ├── CTweakGuiColors.cpp
│   │   │   ├── CTweakGuiColors.hpp
│   │   │   ├── CTweakGunRes.cpp
│   │   │   ├── CTweakGunRes.hpp
│   │   │   ├── CTweakParticle.cpp
│   │   │   ├── CTweakParticle.hpp
│   │   │   ├── CTweakPlayer.cpp
│   │   │   ├── CTweakPlayer.hpp
│   │   │   ├── CTweakPlayerControl.cpp
│   │   │   ├── CTweakPlayerControl.hpp
│   │   │   ├── CTweakPlayerGun.cpp
│   │   │   ├── CTweakPlayerGun.hpp
│   │   │   ├── CTweakPlayerRes.cpp
│   │   │   ├── CTweakPlayerRes.hpp
│   │   │   ├── CTweakSlideShow.cpp
│   │   │   ├── CTweakSlideShow.hpp
│   │   │   ├── CTweakTargeting.cpp
│   │   │   └── CTweakTargeting.hpp
│   │   └── World/
│   │       ├── CAtomicAlpha.cpp
│   │       ├── CAtomicAlpha.hpp
│   │       ├── CAtomicBeta.cpp
│   │       ├── CAtomicBeta.hpp
│   │       ├── CBabygoth.cpp
│   │       ├── CBabygoth.hpp
│   │       ├── CBeetle.cpp
│   │       ├── CBeetle.hpp
│   │       ├── CBloodFlower.cpp
│   │       ├── CBloodFlower.hpp
│   │       ├── CBouncyGrenade.cpp
│   │       ├── CBouncyGrenade.hpp
│   │       ├── CBurrower.cpp
│   │       ├── CBurrower.hpp
│   │       ├── CChozoGhost.cpp
│   │       ├── CChozoGhost.hpp
│   │       ├── CDrone.cpp
│   │       ├── CDrone.hpp
│   │       ├── CDroneLaser.cpp
│   │       ├── CDroneLaser.hpp
│   │       ├── CElitePirate.cpp
│   │       ├── CElitePirate.hpp
│   │       ├── CEnergyBall.cpp
│   │       ├── CEnergyBall.hpp
│   │       ├── CEyeball.cpp
│   │       ├── CEyeball.hpp
│   │       ├── CFireFlea.cpp
│   │       ├── CFireFlea.hpp
│   │       ├── CFlaahgra.cpp
│   │       ├── CFlaahgra.hpp
│   │       ├── CFlaahgraProjectile.cpp
│   │       ├── CFlaahgraProjectile.hpp
│   │       ├── CFlaahgraTentacle.cpp
│   │       ├── CFlaahgraTentacle.hpp
│   │       ├── CFlickerBat.cpp
│   │       ├── CFlickerBat.hpp
│   │       ├── CFlyingPirate.cpp
│   │       ├── CFlyingPirate.hpp
│   │       ├── CGrenadeLauncher.cpp
│   │       ├── CGrenadeLauncher.hpp
│   │       ├── CIceAttackProjectile.cpp
│   │       ├── CIceAttackProjectile.hpp
│   │       ├── CIceSheegoth.cpp
│   │       ├── CIceSheegoth.hpp
│   │       ├── CJellyZap.cpp
│   │       ├── CJellyZap.hpp
│   │       ├── CMagdolite.cpp
│   │       ├── CMagdolite.hpp
│   │       ├── CMakeLists.txt
│   │       ├── CMetaree.cpp
│   │       ├── CMetaree.hpp
│   │       ├── CMetroid.cpp
│   │       ├── CMetroid.hpp
│   │       ├── CMetroidBeta.cpp
│   │       ├── CMetroidBeta.hpp
│   │       ├── CMetroidPrime.cpp
│   │       ├── CMetroidPrime.hpp
│   │       ├── CMetroidPrimeProjectile.cpp
│   │       ├── CMetroidPrimeProjectile.hpp
│   │       ├── CMetroidPrimeRelay.cpp
│   │       ├── CMetroidPrimeRelay.hpp
│   │       ├── CMetroidPrimeStage2.cpp
│   │       ├── CMetroidPrimeStage2.hpp
│   │       ├── CNewIntroBoss.cpp
│   │       ├── CNewIntroBoss.hpp
│   │       ├── COmegaPirate.cpp
│   │       ├── COmegaPirate.hpp
│   │       ├── CParasite.cpp
│   │       ├── CParasite.hpp
│   │       ├── CPhazonHealingNodule.cpp
│   │       ├── CPhazonHealingNodule.hpp
│   │       ├── CPhazonPool.cpp
│   │       ├── CPhazonPool.hpp
│   │       ├── CPuddleSpore.cpp
│   │       ├── CPuddleSpore.hpp
│   │       ├── CPuddleToadGamma.cpp
│   │       ├── CPuddleToadGamma.hpp
│   │       ├── CPuffer.cpp
│   │       ├── CPuffer.hpp
│   │       ├── CRidley.cpp
│   │       ├── CRidley.hpp
│   │       ├── CRipper.cpp
│   │       ├── CRipper.hpp
│   │       ├── CScriptContraption.cpp
│   │       ├── CScriptContraption.hpp
│   │       ├── CSeedling.cpp
│   │       ├── CSeedling.hpp
│   │       ├── CShockWave.cpp
│   │       ├── CShockWave.hpp
│   │       ├── CSpacePirate.cpp
│   │       ├── CSpacePirate.hpp
│   │       ├── CSpankWeed.cpp
│   │       ├── CSpankWeed.hpp
│   │       ├── CThardus.cpp
│   │       ├── CThardus.hpp
│   │       ├── CThardusRockProjectile.cpp
│   │       ├── CThardusRockProjectile.hpp
│   │       ├── CTryclops.cpp
│   │       ├── CTryclops.hpp
│   │       ├── CWarWasp.cpp
│   │       └── CWarWasp.hpp
│   ├── MP2/
│   │   └── CMakeLists.txt
│   ├── MP3/
│   │   └── CMakeLists.txt
│   ├── Memory/
│   │   ├── CCircularBuffer.cpp
│   │   └── CCircularBuffer.hpp
│   ├── MkCastTo.py
│   ├── Particle/
│   │   ├── CColorElement.cpp
│   │   ├── CColorElement.hpp
│   │   ├── CDecal.cpp
│   │   ├── CDecal.hpp
│   │   ├── CDecalDataFactory.cpp
│   │   ├── CDecalDataFactory.hpp
│   │   ├── CDecalDescription.hpp
│   │   ├── CDecalManager.cpp
│   │   ├── CDecalManager.hpp
│   │   ├── CElectricDescription.hpp
│   │   ├── CElementGen.cpp
│   │   ├── CElementGen.hpp
│   │   ├── CEmitterElement.cpp
│   │   ├── CEmitterElement.hpp
│   │   ├── CFlameWarp.cpp
│   │   ├── CFlameWarp.hpp
│   │   ├── CGenDescription.hpp
│   │   ├── CIntElement.cpp
│   │   ├── CIntElement.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CModVectorElement.cpp
│   │   ├── CModVectorElement.hpp
│   │   ├── CParticleDataFactory.cpp
│   │   ├── CParticleDataFactory.hpp
│   │   ├── CParticleElectric.cpp
│   │   ├── CParticleElectric.hpp
│   │   ├── CParticleElectricDataFactory.cpp
│   │   ├── CParticleElectricDataFactory.hpp
│   │   ├── CParticleGen.cpp
│   │   ├── CParticleGen.hpp
│   │   ├── CParticleGlobals.cpp
│   │   ├── CParticleGlobals.hpp
│   │   ├── CParticleSwoosh.cpp
│   │   ├── CParticleSwoosh.hpp
│   │   ├── CParticleSwooshDataFactory.cpp
│   │   ├── CParticleSwooshDataFactory.hpp
│   │   ├── CProjectileWeaponDataFactory.cpp
│   │   ├── CProjectileWeaponDataFactory.hpp
│   │   ├── CRealElement.cpp
│   │   ├── CRealElement.hpp
│   │   ├── CSpawnSystemKeyframeData.cpp
│   │   ├── CSpawnSystemKeyframeData.hpp
│   │   ├── CSwooshDescription.hpp
│   │   ├── CUVElement.cpp
│   │   ├── CUVElement.hpp
│   │   ├── CVectorElement.cpp
│   │   ├── CVectorElement.hpp
│   │   ├── CWarp.hpp
│   │   ├── CWeaponDescription.hpp
│   │   └── IElement.hpp
│   ├── RetroTypes.cpp
│   ├── RetroTypes.hpp
│   ├── Streams/
│   │   ├── CFileOutStream.cpp
│   │   ├── CFileOutStream.hpp
│   │   ├── CInputStream.cpp
│   │   ├── CInputStream.hpp
│   │   ├── CMemoryInStream.hpp
│   │   ├── CMemoryStreamOut.cpp
│   │   ├── CMemoryStreamOut.hpp
│   │   ├── COutputStream.cpp
│   │   ├── COutputStream.hpp
│   │   ├── CTextInStream.cpp
│   │   ├── CTextInStream.hpp
│   │   ├── CTextOutStream.cpp
│   │   ├── CTextOutStream.hpp
│   │   ├── CZipInputStream.cpp
│   │   ├── CZipInputStream.hpp
│   │   ├── ContainerReaders.hpp
│   │   ├── ContainerWriters.hpp
│   │   ├── IOStreams.cpp
│   │   └── IOStreams.hpp
│   ├── Tweaks/
│   │   ├── ITweak.hpp
│   │   ├── ITweakAutoMapper.hpp
│   │   ├── ITweakBall.hpp
│   │   ├── ITweakGame.hpp
│   │   ├── ITweakGui.hpp
│   │   ├── ITweakGuiColors.hpp
│   │   ├── ITweakGunRes.hpp
│   │   ├── ITweakParticle.hpp
│   │   ├── ITweakPlayer.hpp
│   │   ├── ITweakPlayerControl.hpp
│   │   ├── ITweakPlayerGun.cpp
│   │   ├── ITweakPlayerGun.hpp
│   │   ├── ITweakPlayerRes.hpp
│   │   ├── ITweakSlideShow.hpp
│   │   └── ITweakTargeting.hpp
│   ├── Weapon/
│   │   ├── CAuxWeapon.cpp
│   │   ├── CAuxWeapon.hpp
│   │   ├── CBeamInfo.hpp
│   │   ├── CBeamProjectile.cpp
│   │   ├── CBeamProjectile.hpp
│   │   ├── CBomb.cpp
│   │   ├── CBomb.hpp
│   │   ├── CBurstFire.cpp
│   │   ├── CBurstFire.hpp
│   │   ├── CElectricBeamProjectile.cpp
│   │   ├── CElectricBeamProjectile.hpp
│   │   ├── CEnergyProjectile.cpp
│   │   ├── CEnergyProjectile.hpp
│   │   ├── CFidget.cpp
│   │   ├── CFidget.hpp
│   │   ├── CFlameInfo.cpp
│   │   ├── CFlameInfo.hpp
│   │   ├── CFlameThrower.cpp
│   │   ├── CFlameThrower.hpp
│   │   ├── CGSComboFire.cpp
│   │   ├── CGSComboFire.hpp
│   │   ├── CGSFidget.cpp
│   │   ├── CGSFidget.hpp
│   │   ├── CGSFreeLook.cpp
│   │   ├── CGSFreeLook.hpp
│   │   ├── CGameProjectile.cpp
│   │   ├── CGameProjectile.hpp
│   │   ├── CGrappleArm.cpp
│   │   ├── CGrappleArm.hpp
│   │   ├── CGunController.cpp
│   │   ├── CGunController.hpp
│   │   ├── CGunMotion.cpp
│   │   ├── CGunMotion.hpp
│   │   ├── CGunWeapon.cpp
│   │   ├── CGunWeapon.hpp
│   │   ├── CIceBeam.cpp
│   │   ├── CIceBeam.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CNewFlameThrower.cpp
│   │   ├── CNewFlameThrower.hpp
│   │   ├── CPhazonBeam.cpp
│   │   ├── CPhazonBeam.hpp
│   │   ├── CPlasmaBeam.cpp
│   │   ├── CPlasmaBeam.hpp
│   │   ├── CPlasmaProjectile.cpp
│   │   ├── CPlasmaProjectile.hpp
│   │   ├── CPlayerGun.cpp
│   │   ├── CPlayerGun.hpp
│   │   ├── CPowerBeam.cpp
│   │   ├── CPowerBeam.hpp
│   │   ├── CPowerBomb.cpp
│   │   ├── CPowerBomb.hpp
│   │   ├── CProjectileInfo.cpp
│   │   ├── CProjectileInfo.hpp
│   │   ├── CProjectileWeapon.cpp
│   │   ├── CProjectileWeapon.hpp
│   │   ├── CTargetableProjectile.cpp
│   │   ├── CTargetableProjectile.hpp
│   │   ├── CWaveBeam.cpp
│   │   ├── CWaveBeam.hpp
│   │   ├── CWaveBuster.cpp
│   │   ├── CWaveBuster.hpp
│   │   ├── CWeapon.cpp
│   │   ├── CWeapon.hpp
│   │   ├── CWeaponMgr.cpp
│   │   ├── CWeaponMgr.hpp
│   │   ├── CWeaponMode.hpp
│   │   ├── WeaponCommon.cpp
│   │   └── WeaponCommon.hpp
│   ├── World/
│   │   ├── CActor.cpp
│   │   ├── CActor.hpp
│   │   ├── CActorModelParticles.cpp
│   │   ├── CActorModelParticles.hpp
│   │   ├── CActorParameters.hpp
│   │   ├── CAi.cpp
│   │   ├── CAi.hpp
│   │   ├── CAiFuncMap.cpp
│   │   ├── CAiFuncMap.hpp
│   │   ├── CAmbientAI.cpp
│   │   ├── CAmbientAI.hpp
│   │   ├── CAnimationParameters.hpp
│   │   ├── CDamageInfo.cpp
│   │   ├── CDamageInfo.hpp
│   │   ├── CDamageVulnerability.cpp
│   │   ├── CDamageVulnerability.hpp
│   │   ├── CDestroyableRock.cpp
│   │   ├── CDestroyableRock.hpp
│   │   ├── CEffect.cpp
│   │   ├── CEffect.hpp
│   │   ├── CEnergyDrainSource.cpp
│   │   ├── CEnergyDrainSource.hpp
│   │   ├── CEntity.cpp
│   │   ├── CEntity.hpp
│   │   ├── CEntityInfo.hpp
│   │   ├── CEnvFxManager.cpp
│   │   ├── CEnvFxManager.hpp
│   │   ├── CExplosion.cpp
│   │   ├── CExplosion.hpp
│   │   ├── CFire.cpp
│   │   ├── CFire.hpp
│   │   ├── CFishCloud.cpp
│   │   ├── CFishCloud.hpp
│   │   ├── CFishCloudModifier.cpp
│   │   ├── CFishCloudModifier.hpp
│   │   ├── CFluidPlane.cpp
│   │   ├── CFluidPlane.hpp
│   │   ├── CFluidPlaneCPU.cpp
│   │   ├── CFluidPlaneCPU.hpp
│   │   ├── CFluidPlaneDoor.cpp
│   │   ├── CFluidPlaneDoor.hpp
│   │   ├── CFluidPlaneGPU.cpp
│   │   ├── CFluidPlaneGPU.hpp
│   │   ├── CFluidPlaneManager.cpp
│   │   ├── CFluidPlaneManager.hpp
│   │   ├── CFluidUVMotion.cpp
│   │   ├── CFluidUVMotion.hpp
│   │   ├── CGameArea.cpp
│   │   ├── CGameArea.hpp
│   │   ├── CGameLight.cpp
│   │   ├── CGameLight.hpp
│   │   ├── CGrappleParameters.hpp
│   │   ├── CHUDBillboardEffect.cpp
│   │   ├── CHUDBillboardEffect.hpp
│   │   ├── CHUDMemoParms.hpp
│   │   ├── CHealthInfo.cpp
│   │   ├── CHealthInfo.hpp
│   │   ├── CIceImpact.cpp
│   │   ├── CIceImpact.hpp
│   │   ├── CKnockBackController.cpp
│   │   ├── CKnockBackController.hpp
│   │   ├── CLightParameters.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMarkerGrid.cpp
│   │   ├── CMarkerGrid.hpp
│   │   ├── CMorphBall.cpp
│   │   ├── CMorphBall.hpp
│   │   ├── CMorphBallShadow.cpp
│   │   ├── CMorphBallShadow.hpp
│   │   ├── CPathFindArea.cpp
│   │   ├── CPathFindArea.hpp
│   │   ├── CPathFindRegion.cpp
│   │   ├── CPathFindRegion.hpp
│   │   ├── CPathFindSearch.cpp
│   │   ├── CPathFindSearch.hpp
│   │   ├── CPathFindSpline.cpp
│   │   ├── CPatterned.cpp
│   │   ├── CPatterned.hpp
│   │   ├── CPatternedInfo.cpp
│   │   ├── CPatternedInfo.hpp
│   │   ├── CPhysicsActor.cpp
│   │   ├── CPhysicsActor.hpp
│   │   ├── CPlayer.cpp
│   │   ├── CPlayer.hpp
│   │   ├── CPlayerCameraBob.cpp
│   │   ├── CPlayerCameraBob.hpp
│   │   ├── CPlayerEnergyDrain.cpp
│   │   ├── CPlayerEnergyDrain.hpp
│   │   ├── CProjectedShadow.cpp
│   │   ├── CProjectedShadow.hpp
│   │   ├── CRepulsor.cpp
│   │   ├── CRepulsor.hpp
│   │   ├── CRipple.cpp
│   │   ├── CRipple.hpp
│   │   ├── CRippleManager.cpp
│   │   ├── CRippleManager.hpp
│   │   ├── CScannableParameters.hpp
│   │   ├── CScriptActor.cpp
│   │   ├── CScriptActor.hpp
│   │   ├── CScriptActorKeyframe.cpp
│   │   ├── CScriptActorKeyframe.hpp
│   │   ├── CScriptActorRotate.cpp
│   │   ├── CScriptActorRotate.hpp
│   │   ├── CScriptAiJumpPoint.cpp
│   │   ├── CScriptAiJumpPoint.hpp
│   │   ├── CScriptAreaAttributes.cpp
│   │   ├── CScriptAreaAttributes.hpp
│   │   ├── CScriptBallTrigger.cpp
│   │   ├── CScriptBallTrigger.hpp
│   │   ├── CScriptBeam.cpp
│   │   ├── CScriptBeam.hpp
│   │   ├── CScriptCameraBlurKeyframe.cpp
│   │   ├── CScriptCameraBlurKeyframe.hpp
│   │   ├── CScriptCameraFilterKeyframe.cpp
│   │   ├── CScriptCameraFilterKeyframe.hpp
│   │   ├── CScriptCameraHint.cpp
│   │   ├── CScriptCameraHint.hpp
│   │   ├── CScriptCameraHintTrigger.cpp
│   │   ├── CScriptCameraHintTrigger.hpp
│   │   ├── CScriptCameraPitchVolume.cpp
│   │   ├── CScriptCameraPitchVolume.hpp
│   │   ├── CScriptCameraShaker.cpp
│   │   ├── CScriptCameraShaker.hpp
│   │   ├── CScriptCameraWaypoint.cpp
│   │   ├── CScriptCameraWaypoint.hpp
│   │   ├── CScriptColorModulate.cpp
│   │   ├── CScriptColorModulate.hpp
│   │   ├── CScriptControllerAction.cpp
│   │   ├── CScriptControllerAction.hpp
│   │   ├── CScriptCounter.cpp
│   │   ├── CScriptCounter.hpp
│   │   ├── CScriptCoverPoint.cpp
│   │   ├── CScriptCoverPoint.hpp
│   │   ├── CScriptDamageableTrigger.cpp
│   │   ├── CScriptDamageableTrigger.hpp
│   │   ├── CScriptDebris.cpp
│   │   ├── CScriptDebris.hpp
│   │   ├── CScriptDebugCameraWaypoint.cpp
│   │   ├── CScriptDebugCameraWaypoint.hpp
│   │   ├── CScriptDistanceFog.cpp
│   │   ├── CScriptDistanceFog.hpp
│   │   ├── CScriptDock.cpp
│   │   ├── CScriptDock.hpp
│   │   ├── CScriptDockAreaChange.cpp
│   │   ├── CScriptDockAreaChange.hpp
│   │   ├── CScriptDoor.cpp
│   │   ├── CScriptDoor.hpp
│   │   ├── CScriptEMPulse.cpp
│   │   ├── CScriptEMPulse.hpp
│   │   ├── CScriptEffect.cpp
│   │   ├── CScriptEffect.hpp
│   │   ├── CScriptGenerator.cpp
│   │   ├── CScriptGenerator.hpp
│   │   ├── CScriptGrapplePoint.cpp
│   │   ├── CScriptGrapplePoint.hpp
│   │   ├── CScriptGunTurret.cpp
│   │   ├── CScriptGunTurret.hpp
│   │   ├── CScriptHUDMemo.cpp
│   │   ├── CScriptHUDMemo.hpp
│   │   ├── CScriptMazeNode.cpp
│   │   ├── CScriptMazeNode.hpp
│   │   ├── CScriptMemoryRelay.cpp
│   │   ├── CScriptMemoryRelay.hpp
│   │   ├── CScriptMidi.cpp
│   │   ├── CScriptMidi.hpp
│   │   ├── CScriptPickup.cpp
│   │   ├── CScriptPickup.hpp
│   │   ├── CScriptPickupGenerator.cpp
│   │   ├── CScriptPickupGenerator.hpp
│   │   ├── CScriptPlatform.cpp
│   │   ├── CScriptPlatform.hpp
│   │   ├── CScriptPlayerActor.cpp
│   │   ├── CScriptPlayerActor.hpp
│   │   ├── CScriptPlayerHint.cpp
│   │   ├── CScriptPlayerHint.hpp
│   │   ├── CScriptPlayerStateChange.cpp
│   │   ├── CScriptPlayerStateChange.hpp
│   │   ├── CScriptPointOfInterest.cpp
│   │   ├── CScriptPointOfInterest.hpp
│   │   ├── CScriptRandomRelay.cpp
│   │   ├── CScriptRandomRelay.hpp
│   │   ├── CScriptRelay.cpp
│   │   ├── CScriptRelay.hpp
│   │   ├── CScriptRipple.cpp
│   │   ├── CScriptRipple.hpp
│   │   ├── CScriptRoomAcoustics.cpp
│   │   ├── CScriptRoomAcoustics.hpp
│   │   ├── CScriptShadowProjector.cpp
│   │   ├── CScriptShadowProjector.hpp
│   │   ├── CScriptSound.cpp
│   │   ├── CScriptSound.hpp
│   │   ├── CScriptSpawnPoint.cpp
│   │   ├── CScriptSpawnPoint.hpp
│   │   ├── CScriptSpecialFunction.cpp
│   │   ├── CScriptSpecialFunction.hpp
│   │   ├── CScriptSpiderBallAttractionSurface.cpp
│   │   ├── CScriptSpiderBallAttractionSurface.hpp
│   │   ├── CScriptSpiderBallWaypoint.cpp
│   │   ├── CScriptSpiderBallWaypoint.hpp
│   │   ├── CScriptSpindleCamera.cpp
│   │   ├── CScriptSpindleCamera.hpp
│   │   ├── CScriptSteam.cpp
│   │   ├── CScriptSteam.hpp
│   │   ├── CScriptStreamedMusic.cpp
│   │   ├── CScriptStreamedMusic.hpp
│   │   ├── CScriptSwitch.cpp
│   │   ├── CScriptSwitch.hpp
│   │   ├── CScriptTargetingPoint.cpp
│   │   ├── CScriptTargetingPoint.hpp
│   │   ├── CScriptTimer.cpp
│   │   ├── CScriptTimer.hpp
│   │   ├── CScriptTrigger.cpp
│   │   ├── CScriptTrigger.hpp
│   │   ├── CScriptVisorFlare.cpp
│   │   ├── CScriptVisorFlare.hpp
│   │   ├── CScriptVisorGoo.cpp
│   │   ├── CScriptVisorGoo.hpp
│   │   ├── CScriptWater.cpp
│   │   ├── CScriptWater.hpp
│   │   ├── CScriptWaypoint.cpp
│   │   ├── CScriptWaypoint.hpp
│   │   ├── CScriptWorldTeleporter.cpp
│   │   ├── CScriptWorldTeleporter.hpp
│   │   ├── CSnakeWeedSwarm.cpp
│   │   ├── CSnakeWeedSwarm.hpp
│   │   ├── CStateMachine.cpp
│   │   ├── CStateMachine.hpp
│   │   ├── CTeamAiMgr.cpp
│   │   ├── CTeamAiMgr.hpp
│   │   ├── CTeamAiTypes.hpp
│   │   ├── CVisorFlare.cpp
│   │   ├── CVisorFlare.hpp
│   │   ├── CVisorParameters.hpp
│   │   ├── CWallCrawlerSwarm.cpp
│   │   ├── CWallCrawlerSwarm.hpp
│   │   ├── CWallWalker.cpp
│   │   ├── CWallWalker.hpp
│   │   ├── CWorld.cpp
│   │   ├── CWorld.hpp
│   │   ├── CWorldLight.cpp
│   │   ├── CWorldLight.hpp
│   │   ├── CWorldShadow.cpp
│   │   ├── CWorldShadow.hpp
│   │   ├── CWorldTransManager.cpp
│   │   ├── CWorldTransManager.hpp
│   │   ├── IGameArea.cpp
│   │   ├── IGameArea.hpp
│   │   ├── ScriptLoader.cpp
│   │   ├── ScriptLoader.hpp
│   │   ├── ScriptObjectSupport.cpp
│   │   └── ScriptObjectSupport.hpp
│   ├── platforms/
│   │   ├── freedesktop/
│   │   │   ├── metaforce.desktop
│   │   │   └── mkwmicon.c
│   │   ├── ios/
│   │   │   ├── Assets.car
│   │   │   ├── Base.lproj/
│   │   │   │   └── LaunchScreen.storyboardc/
│   │   │   │       ├── 01J-lp-oVM-view-Ze5-6b-2t3.nib
│   │   │   │       ├── Info.plist
│   │   │   │       └── UIViewController-01J-lp-oVM.nib
│   │   │   └── Info.plist.in
│   │   ├── macos/
│   │   │   ├── Info.plist.in
│   │   │   └── mainicon.icns
│   │   ├── tvos/
│   │   │   ├── Assets.car
│   │   │   ├── Base.lproj/
│   │   │   │   └── LaunchScreen.storyboardc/
│   │   │   │       ├── BYZ-38-t0r-view-8bC-Xf-vdC.nib
│   │   │   │       ├── Info.plist
│   │   │   │       └── UIViewController-BYZ-38-t0r.nib
│   │   │   └── Info.plist.in
│   │   └── win/
│   │       ├── Package.appxmanifest
│   │       ├── metaforce.aps
│   │       ├── metaforce.manifest
│   │       └── metaforce.rc.in
│   └── rstl.hpp
├── android/
│   ├── .gitignore
│   ├── README.md
│   ├── app/
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       └── main/
│   │           ├── AndroidManifest.xml
│   │           ├── java/
│   │           │   ├── com/
│   │           │   │   └── axiodl/
│   │           │   │       └── metaforce/
│   │           │   │           └── MetaforceActivity.java
│   │           │   └── org/
│   │           │       └── libsdl/
│   │           │           └── app/
│   │           │               ├── HIDDevice.java
│   │           │               ├── HIDDeviceBLESteamController.java
│   │           │               ├── HIDDeviceManager.java
│   │           │               ├── HIDDeviceUSB.java
│   │           │               ├── SDL.java
│   │           │               ├── SDLActivity.java
│   │           │               ├── SDLAudioManager.java
│   │           │               ├── SDLControllerManager.java
│   │           │               ├── SDLDummyEdit.java
│   │           │               ├── SDLInputConnection.java
│   │           │               └── SDLSurface.java
│   │           └── res/
│   │               └── values/
│   │                   └── strings.xml
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── scripts/
│   │   ├── stage-jni-libs.sh
│   │   └── sync-sdl-java.sh
│   └── settings.gradle
├── bintoc/
│   ├── CMakeLists.txt
│   ├── bintoc.c
│   └── bintocHelpers.cmake
├── ci/
│   ├── build-appimage.sh
│   ├── build-dmg.sh
│   ├── build-ipa.sh
│   ├── upload-debug-linux.sh
│   └── upload-debug-macos.sh
├── extern/
│   └── CMakeLists.txt
├── gbalink/
│   ├── CMakeLists.txt
│   └── main.cpp
├── imgui/
│   ├── CMakeLists.txt
│   ├── ImGuiEngine.cpp
│   ├── ImGuiEngine.hpp
│   ├── magic_enum.hpp
│   └── stb_image.h
├── ios.toolchain.cmake
├── lldb-extras/
│   ├── .lldbinit
│   ├── README.txt
│   └── metaforce_lldb_tools.py
├── normalize_submodules.sh
└── version.h.in

================================================
FILE CONTENTS
================================================

================================================
FILE: .clang-format
================================================
---
BasedOnStyle: LLVM
ColumnLimit: 120
UseTab: Never
TabWidth: 2
---
Language: Cpp
DerivePointerAlignment: false
PointerAlignment: Left
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
IndentCaseLabels: false
AllowShortBlocksOnASingleLine: Always
AlignOperands: true
AlignTrailingComments: true
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BreakConstructorInitializersBeforeComma: true
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
AllowShortFunctionsOnASingleLine: All
Cpp11BracedListStyle: true
NamespaceIndentation: None
BinPackArguments: true
BinPackParameters: true
SortIncludes: false
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true


================================================
FILE: .clang-tidy
================================================
Checks: >
  *,
  -altera-*,
  -cppcoreguidelines-avoid-magic-numbers,
  -cppcoreguidelines-avoid-non-const-global-variables,
  -cppcoreguidelines-owning-memory,
  -cppcoreguidelines-pro-bounds-constant-array-index,
  -cppcoreguidelines-pro-bounds-pointer-arithmetic,
  -cppcoreguidelines-pro-type-reinterpret-cast,
  -cppcoreguidelines-pro-type-static-cast-downcast,
  -cppcoreguidelines-pro-type-union-access,
  -cppcoreguidelines-pro-type-vararg,
  -fuchsia-*,
  -google-runtime-references,
  -hicpp-*,
  -llvm-header-guard,
  -llvmlibc-*,
  -misc-unused-parameters,
  -modernize-use-trailing-return-type,
  -readability-convert-member-functions-to-static,
  -readability-function-cognitive-complexity,
  -readability-magic-numbers,
  -readability-named-parameter,
  -readability-uppercase-literal-suffix,
CheckOptions:
  - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
    value: '1'

================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"  
    schedule:
      interval: "weekly"


================================================
FILE: .github/workflows/build.yml
================================================
name: Build

on:
  push:
    paths-ignore:
      - '*.md'
      - '*LICENSE'
  pull_request:

env:
  SCCACHE_GHA_ENABLED: "true"
  RUSTC_WRAPPER: "sccache"

jobs:
  build-linux:
    name: Build Linux (${{matrix.name}} x86_64)
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        include:
          - name: GCC
            preset: gcc
          - name: Clang
            preset: clang

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          submodules: recursive

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev \
            zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
            libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \
            libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \
            libxss-dev libfuse2

      - name: Setup sccache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Configure CMake
        run: cmake --preset x-linux-ci-${{matrix.preset}}

      - name: Build
        run: cmake --build --preset x-linux-ci-${{matrix.preset}}

      - name: Generate AppImage
        run: ci/build-appimage.sh

      - name: Upload artifacts
        uses: actions/upload-artifact@v7
        with:
          name: metaforce-${{env.METAFORCE_VERSION}}-linux-${{matrix.preset}}-x86_64
          path: |
            build/install/Metaforce-*.AppImage
            build/install/debug.tar.*

  build-macos:
    name: Build macOS (AppleClang universal)
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          submodules: recursive

      - name: Install dependencies
        run: |
          brew update
          brew upgrade --formula
          brew install cmake ninja graphicsmagick imagemagick
          pip3 install --break-system-packages markupsafe

      - name: Setup sccache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Configure CMake
        run: cmake --preset x-macos-ci

      - name: Build
        run: cmake --build --preset x-macos-ci
        
        #- name: Import signing certificate
        # if: 'false' # temporarily disabled
        #uses: devbotsxyz/xcode-import-certificate@master
        #with:
        #  certificate-data: ${{secrets.MACOS_CERTIFICATE_DATA}}
        #  certificate-passphrase: ${{secrets.MACOS_CERTIFICATE_PASSWORD}}
        #  keychain-password: ${{secrets.MACOS_KEYCHAIN_PASSWORD}}

      - name: Upload artifacts
        uses: actions/upload-artifact@v7
        with:
          name: metaforce-${{env.METAFORCE_VERSION}}-macos-appleclang-universal
          path: |
            build/install/Metaforce.app
            build/install/debug.tar.*

  build-ios:
    name: Build iOS (AppleClang arm64)
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          submodules: recursive

      - name: Install dependencies
        run: |
          brew update
          brew upgrade --formula
          brew install cmake ninja
          pip3 install --break-system-packages markupsafe
          rustup target add aarch64-apple-ios

      - name: Setup sccache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Configure CMake
        run: cmake --preset x-ios-ci

      - name: Build
        run: cmake --build --preset x-ios-ci --target install

      - name: Upload artifacts
        uses: actions/upload-artifact@v7
        with:
          name: metaforce-${{env.METAFORCE_VERSION}}-ios-appleclang-arm64
          path: |
            build/install/Metaforce.app
            build/install/debug.tar.*

  build-tvos:
    name: Build tvOS (AppleClang arm64)
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          submodules: recursive

      - name: Install dependencies
        run: |
          brew update
          brew upgrade --formula
          brew install cmake ninja
          pip3 install --break-system-packages markupsafe
          rustup toolchain install nightly
          rustup target add --toolchain nightly aarch64-apple-tvos

      - name: Setup sccache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Configure CMake
        run: cmake --preset x-tvos-ci

      - name: Build
        run: cmake --build --preset x-tvos-ci --target install

      - name: Upload artifacts
        uses: actions/upload-artifact@v7
        with:
          name: metaforce-${{env.METAFORCE_VERSION}}-tvos-appleclang-arm64
          path: |
            build/install/Metaforce.app
            build/install/debug.tar.*

  build-windows:
    name: Build Windows (${{matrix.name}} x86_64)
    runs-on: windows-latest

    env:
      BUILD_DIR: C:\build

    strategy:
      fail-fast: false
      matrix:
        include:
          - name: MSVC
            preset: msvc
          - name: Clang
            preset: clang

    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          submodules: recursive

      - name: Enable Visual Studio environment
        uses: ilammy/msvc-dev-cmd@v1

      # msvc-dev-cmd sets VCPKG_ROOT, set it back
      - name: Override VCPKG_ROOT
        run: echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV

      - name: Setup sccache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Install dependencies
        run: |
          choco install ninja
          vcpkg install zlib:x64-windows-static bzip2:x64-windows-static zstd:x64-windows-static `
            liblzma:x64-windows-static freetype:x64-windows-static

      - name: Configure CMake
        run: cmake --preset x-windows-ci-${{matrix.preset}}

      - name: Build
        run: cmake --build --preset x-windows-ci-${{matrix.preset}}

      - name: Upload artifacts
        uses: actions/upload-artifact@v7
        with:
          name: metaforce-${{env.METAFORCE_VERSION}}-win32-${{matrix.preset}}-x86_64
          path: |
            ${{env.BUILD_DIR}}/install/*.exe
            ${{env.BUILD_DIR}}/install/debug.7z


================================================
FILE: .gitignore
================================================
*.autosave
*.user
.buildcache/
.directory
.DS_Store
.idea/
.vs/
build/
cmake-build-*/
CMakeUserPresets.json
docs/*
out/
Runtime/platforms/win/metaforce.rc
version.h


================================================
FILE: .gitmodules
================================================
[submodule "extern/nod"]
	path = extern/nod
	url = https://github.com/encounter/nod.git
	branch = main
[submodule "extern/kabufuda"]
	path = extern/kabufuda
	url = ../kabufuda.git
	branch = master
[submodule "extern/jbus"]
	path = extern/jbus
	url = ../jbus.git
	branch = master
[submodule "extern/fixNES"]
	path = extern/fixNES
	url = https://github.com/FIX94/fixNES.git
	branch = master
[submodule "extern/libjpeg-turbo"]
	path = extern/libjpeg-turbo
	url = ../libjpeg-turbo.git
	branch = thp
[submodule "extern/zeus"]
	path = extern/zeus
	url = ../zeus.git
	branch = master
[submodule "extern/nativefiledialog-extended"]
	path = extern/nativefiledialog-extended
	url = https://github.com/btzy/nativefiledialog-extended
[submodule "extern/aurora"]
	path = extern/aurora
	url = https://github.com/encounter/aurora.git
	branch = main
[submodule "extern/spdlog"]
	path = extern/spdlog
	url = https://github.com/gabime/spdlog.git
	branch = v1.x
[submodule "extern/musyx"]
	path = extern/musyx
	url = https://github.com/AxioDL/musyx.git


================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.25...4.1)

if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
      "Build type options: Debug Release RelWithDebInfo MinSizeRel" FORCE)
endif ()

# obtain revision info from git
find_package(Git)
if (GIT_FOUND)
  # make sure version information gets re-run when the current Git HEAD changes
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --git-path HEAD
          OUTPUT_VARIABLE metaforce_git_head_filename
          OUTPUT_STRIP_TRAILING_WHITESPACE)
  set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${metaforce_git_head_filename}")

  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --symbolic-full-name HEAD
          OUTPUT_VARIABLE metaforce_git_head_symbolic
          OUTPUT_STRIP_TRAILING_WHITESPACE)
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
          COMMAND ${GIT_EXECUTABLE} rev-parse --git-path ${metaforce_git_head_symbolic}
          OUTPUT_VARIABLE metaforce_git_head_symbolic_filename
          OUTPUT_STRIP_TRAILING_WHITESPACE)
  set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${metaforce_git_head_symbolic_filename}")

  # defines METAFORCE_WC_REVISION
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
          OUTPUT_VARIABLE METAFORCE_WC_REVISION
          OUTPUT_STRIP_TRAILING_WHITESPACE)
  # defines METAFORCE_WC_DESCRIBE
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --tag --long --dirty
          OUTPUT_VARIABLE METAFORCE_WC_DESCRIBE
          OUTPUT_STRIP_TRAILING_WHITESPACE)

  # remove hash (and trailing "-0" if needed) from description
  string(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" METAFORCE_WC_DESCRIBE "${METAFORCE_WC_DESCRIBE}")

  # defines METAFORCE_WC_BRANCH
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
          OUTPUT_VARIABLE METAFORCE_WC_BRANCH
          OUTPUT_STRIP_TRAILING_WHITESPACE)
  # defines METAFORCE_WC_DATE
  execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} log -1 --format=%ad
          OUTPUT_VARIABLE METAFORCE_WC_DATE
          OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
  message(STATUS "Unable to find git, commit information will not be available")
endif ()

if (METAFORCE_WC_DESCRIBE)
  string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+)\-([0-9]+).*" "\\1.\\2.\\3.\\4" METAFORCE_VERSION_STRING "${METAFORCE_WC_DESCRIBE}")
  string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+).*" "\\1.\\2.\\3" METAFORCE_SHORT_VERSION_STRING "${METAFORCE_WC_DESCRIBE}")
else ()
  set(METAFORCE_WC_DESCRIBE "UNKNOWN-VERSION")
  set(METAFORCE_VERSION_STRING "0.0.0")
endif ()

string(TIMESTAMP CURRENT_YEAR "%Y")

# Add version information to CI environment variables
if(DEFINED ENV{GITHUB_ENV})
  file(APPEND "$ENV{GITHUB_ENV}" "METAFORCE_VERSION=${METAFORCE_WC_DESCRIBE}\n")
endif()
message(STATUS "Metaforce version set to ${METAFORCE_WC_DESCRIBE}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
project(metaforce LANGUAGES C CXX VERSION ${METAFORCE_VERSION_STRING})
if (APPLE AND NOT TVOS AND CMAKE_SYSTEM_NAME STREQUAL tvOS)
  # ios.toolchain.cmake hack for SDL
  set(TVOS ON)
  set(IOS OFF)
endif ()
if (EMSCRIPTEN)
  set(CMAKE_EXECUTABLE_SUFFIX .html)
endif ()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)

if(APPLE AND NOT CMAKE_OSX_SYSROOT)
  # If the Xcode SDK is lagging behind system version, CMake needs this done first
  execute_process(COMMAND xcrun --sdk macosx --show-sdk-path
                  OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
                  OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(BUILD_SHARED_LIBS OFF CACHE BOOL "Force shared libs off" FORCE)
set(BUILD_STATIC_LIBS ON CACHE BOOL "Force static libs on" FORCE)

if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64)
  set(METAFORCE_VECTOR_ISA "sse41" CACHE STRING "Vector ISA to build for (sse2, sse3, sse41, avx, avx2)")
endif ()

if(MSVC)
  if(${METAFORCE_VECTOR_ISA} STREQUAL "avx2")
    add_compile_options(/arch:AVX2)
    add_compile_definitions(__SSE4_1__=1)
    message(STATUS "Building with AVX2 Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "avx")
    add_compile_options(/arch:AVX)
    add_compile_definitions(__SSE4_1__=1)
    message(STATUS "Building with AVX Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "sse41")
    add_compile_definitions(__SSE4_1__=1)
    # clang-cl 10 requires -msse4.1, may be fixed in newer versions?
    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL Clang)
      add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-msse4.1>)
    endif()
    message(STATUS "Building with SSE4.1 Vector ISA")
  else()
    message(STATUS "Building with SSE2 Vector ISA")
  endif()

  if(${CMAKE_GENERATOR} MATCHES "Visual Studio*")
    set(VS_OPTIONS "/MP")
    set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT metaforce)
  endif()

  # Shaddup MSVC
  add_compile_definitions(UNICODE=1 _UNICODE=1 __SSE__=1
      _CRT_SECURE_NO_WARNINGS=1 D_SCL_SECURE_NO_WARNINGS=1
      _SCL_SECURE_NO_DEPRECATE=1 _CRT_NONSTDC_NO_WARNINGS=1
      _ENABLE_EXTENDED_ALIGNED_STORAGE=1 NOMINMAX=1
      _HAS_EXCEPTIONS=0)
  add_compile_options(/IGNORE:4221
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4018>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4800>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4005>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4311>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4068>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4267>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4244>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4200>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4305>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4067>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4146>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4309>
          $<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:/wd4805>
          ${VS_OPTIONS})

  string(REPLACE "/GR " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  string(REPLACE " /EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
  add_compile_options(
    # Disable exceptions
    $<$<COMPILE_LANGUAGE:CXX>:/EHsc->

    # Disable RTTI
    $<$<COMPILE_LANGUAGE:CXX>:/GR->

    # Enforce various standards compliant behavior.
    $<$<COMPILE_LANGUAGE:CXX>:/permissive->

    # Enable standard volatile semantics.
    $<$<COMPILE_LANGUAGE:CXX>:/volatile:iso>

    # Reports the proper value for the __cplusplus preprocessor macro.
    $<$<COMPILE_LANGUAGE:CXX>:/Zc:__cplusplus>
  )

  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    # Flags for MSVC (not clang-cl)
    add_compile_options(
      # Enable standards conforming preprocessor.
      $<$<COMPILE_LANGUAGE:CXX>:/Zc:preprocessor>

      # Allow constexpr variables to have explicit external linkage.
      $<$<COMPILE_LANGUAGE:CXX>:/Zc:externConstexpr>

      # Assume that new throws exceptions, allowing better code generation.
      $<$<COMPILE_LANGUAGE:CXX>:/Zc:throwingNew>

      # Link-time Code Generation for Release builds
      $<$<CONFIG:Release>:/GL>
    )

    # Link-time Code Generation for Release builds
    set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/LTCG")
    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
    set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup")
  endif()

else()
  if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64)
  if(${METAFORCE_VECTOR_ISA} STREQUAL "native")
    add_compile_options(-march=native)
    message(STATUS "Building with native ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "avx2")
    add_compile_options(-mavx2)
    message(STATUS "Building with AVX2 Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "avx")
    add_compile_options(-mavx)
    message(STATUS "Building with AVX Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "sse41")
    add_compile_options(-msse4.1)
    message(STATUS "Building with SSE4.1 Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "sse3")
    add_compile_options(-msse3)
    message(STATUS "Building with SSE3 Vector ISA")
  elseif(${METAFORCE_VECTOR_ISA} STREQUAL "sse2")
    add_compile_options(-msse2)
    message(STATUS "Building with SSE2 Vector ISA")
  else()
    message(STATUS "Building with x87 Vector ISA")
  endif()
  endif()

  include(CheckCXXCompilerFlag)
  check_cxx_compiler_flag(-fno-plt HAS_NO_PLT)
  if (HAS_NO_PLT)
    add_compile_options(-fno-plt)
  endif()
  check_cxx_compiler_flag(-fno-asynchronous-unwind-tables HAS_NO_ASYNC_UNWIND_TABLES)
  if (HAS_NO_ASYNC_UNWIND_TABLES AND ${CMAKE_BUILD_TYPE} STREQUAL Release)
    # Binary size reduction
    add_compile_options(-fno-asynchronous-unwind-tables)
  endif()

  if (METAFORCE_ASAN)
    add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> -fsanitize=address
        -fsanitize-address-use-after-scope)
    add_link_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> -fsanitize=address
        -fsanitize-address-use-after-scope)
  elseif(METAFORCE_MSAN)
    add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> -fsanitize=memory
                        -fsanitize-memory-track-origins -fsanitize-recover=all)
  endif()
  add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
                      $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
                      -Wall -Wno-multichar
                      -Wno-unused-variable -Wno-unused-result -Wno-unused-but-set-variable
                      -Wno-unused-function -Wno-sign-compare -Wno-unknown-pragmas)
  # doesn't work with generator expression in add_compile_options?
  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
    add_compile_options(-Wno-unknown-warning-option -Wno-unused-private-field)
  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    add_compile_options(-Wno-lto-type-mismatch -Wno-maybe-uninitialized)
  endif()

  if(APPLE)
    add_compile_options(-Wno-error=deprecated-declarations
                        $<$<CONFIG:Release>:-flto=thin>)
  endif()

endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
  include_directories(/usr/local/include)
  link_directories(/usr/local/lib)
endif()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    if(${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
      # This is required to summarize std::string
      add_compile_options(-fno-limit-debug-info -fno-omit-frame-pointer)
    endif()
    option(USE_LD_LLD "Link with LLD" ON)
  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    option(USE_LD_GOLD "Link with GNU Gold" ON)
  endif()

  include(CheckIPOSupported)
  check_ipo_supported(RESULT LTO_SUPPORTED)
  if(LTO_SUPPORTED AND ("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
    option(USE_LTO "Enable LTO" ON)
  else()
    option(USE_LTO "Enable LTO" OFF)
  endif()
  # FIXME GCC 11.1 -flto is completely broken
  if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 11.1.0)
    message(NOTICE "Working around GCC 11.1 bug; disabling LTO")
    set(USE_LTO OFF)
  endif()
else()
  option(USE_LD_LLD "Link with LLD" OFF)
  option(USE_LD_GOLD "Link with GNU Gold" OFF)
  option(USE_LTO "Enable LTO" OFF)
endif()
if(USE_LD_LLD)
  execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
  if("${LD_VERSION}" MATCHES "LLD")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld -Wl,--build-id=uuid")
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
    if(USE_LTO)
      add_compile_options(-flto=thin)
      add_link_options(-flto=thin)
      message(STATUS "LLD linker enabled with LTO.")
    else()
      message(STATUS "LLD linker enabled.")
    endif()
    set(USE_LD_GOLD OFF)
  else()
    message(WARNING "LLD linker isn't available, using the default system linker.")
    set(USE_LD_LLD OFF)
  endif()
endif()
if(USE_LD_GOLD)
  execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
  if("${LD_VERSION}" MATCHES "GNU gold")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
    if (USE_SPLIT_DWARF)
      add_compile_options(-gsplit-dwarf -Wl,--gdb-index)
      add_link_options(-gsplit-dwarf -Wl,--gdb-index)
      message(STATUS "GNU gold linker enabled with split DWARF.")
    elseif (USE_LTO)
      add_compile_options(-flto)
      add_link_options(-flto)
      message(STATUS "GNU gold linker enabled with LTO.")
    else()
      message(STATUS "GNU gold linker enabled.")
    endif()
    set(USE_LD_LLD OFF)
  else()
    message(WARNING "GNU gold linker isn't available, using the default system linker.")
    set(USE_LD_GOLD OFF)
  endif()
endif()

find_package(ZLIB REQUIRED)

include(ExternalProject)
set(BINTOC_CMAKE_ARGS
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>)

if (CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_CROSSCOMPILING)
  if (IS_ABSOLUTE "${CMAKE_TOOLCHAIN_FILE}")
    set(BINTOC_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}")
  else ()
    set(BINTOC_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/${CMAKE_TOOLCHAIN_FILE}")
  endif ()
  list(APPEND BINTOC_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${BINTOC_TOOLCHAIN_FILE})
endif ()

if (CMAKE_MAKE_PROGRAM)
  list(APPEND BINTOC_CMAKE_ARGS -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM})
endif ()

if (DEFINED VCPKG_TARGET_TRIPLET AND NOT "${VCPKG_TARGET_TRIPLET}" STREQUAL "" AND NOT CMAKE_CROSSCOMPILING)
  list(APPEND BINTOC_CMAKE_ARGS -DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET})
endif ()

ExternalProject_Add(bintoc
    SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/bintoc"
    CMAKE_ARGS ${BINTOC_CMAKE_ARGS}
    INSTALL_COMMAND ${CMAKE_COMMAND} --build . --config Release --target install)
include(${CMAKE_CURRENT_LIST_DIR}/bintoc/bintocHelpers.cmake)

add_subdirectory(extern)
add_subdirectory(imgui)
add_subdirectory(NESEmulator EXCLUDE_FROM_ALL)
add_subdirectory(Runtime)
add_subdirectory(gbalink EXCLUDE_FROM_ALL)

configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_BINARY_DIR}/version.h)

# Packaging logic
function(get_target_output_name target result_var)
  get_target_property(output_name ${target} OUTPUT_NAME)
  if (output_name STREQUAL "output_name-NOTFOUND")
    set(${result_var} "${target}" PARENT_SCOPE)
  else ()
    set(${result_var} "${output_name}" PARENT_SCOPE)
  endif ()
endfunction()
function(get_target_prefix target result_var)
  set(${result_var} "" PARENT_SCOPE)
  if (APPLE)
    # Have to recreate some bundle logic here, since CMake can't tell us
    get_target_property(is_bundle ${target} MACOSX_BUNDLE)
    if (is_bundle)
      get_target_output_name(${target} output_name)
      if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
        set(${result_var} "${output_name}.app/Contents/MacOS/" PARENT_SCOPE)
      else ()
        set(${result_var} "${output_name}.app/" PARENT_SCOPE)
      endif ()
    endif ()
  endif ()
endfunction()
list(APPEND BINARY_TARGETS metaforce)
set(EXTRA_TARGETS "")
if (TARGET crashpad_handler)
  list(APPEND EXTRA_TARGETS crashpad_handler)
endif ()
set(BIN_PREFIX "${CMAKE_INSTALL_PREFIX}")
install(TARGETS ${BINARY_TARGETS} ${EXTRA_TARGETS} DESTINATION ${BIN_PREFIX})
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
  set(DEBUG_FILES_LIST "")
  foreach (target IN LISTS BINARY_TARGETS EXTRA_TARGETS)
    get_target_output_name(${target} output_name)
    if (WIN32)
      install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${BIN_PREFIX} OPTIONAL)
    elseif (APPLE)
      get_target_prefix(${target} target_prefix)
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND rm -fr \"$<TARGET_FILE_NAME:${target}>.dSYM\")")
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND dsymutil \"${target_prefix}$<TARGET_FILE_NAME:${target}>\")")
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND strip -S \"${target_prefix}$<TARGET_FILE_NAME:${target}>\")")
      if (NOT target_prefix STREQUAL "")
        install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND mv \"${target_prefix}$<TARGET_FILE_NAME:${target}>.dSYM\" .)")
      endif ()
    elseif (UNIX)
      get_target_prefix(${target} target_prefix)
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND objcopy --only-keep-debug \"${target_prefix}$<TARGET_FILE_NAME:${target}>\" \"${target_prefix}$<TARGET_FILE_NAME:${target}>.dbg\")")
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND objcopy --strip-debug --add-gnu-debuglink=$<TARGET_FILE_NAME:${target}>.dbg \"${target_prefix}$<TARGET_FILE_NAME:${target}>\")")
    endif ()
    list(APPEND DEBUG_FILES_LIST "${output_name}")
  endforeach ()
  if (WIN32)
    list(TRANSFORM DEBUG_FILES_LIST APPEND ".pdb")
    list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
    install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND 7z a -t7z \"${CMAKE_INSTALL_PREFIX}/debug.7z\" ${DEBUG_FILES})")
  elseif (APPLE)
    list(TRANSFORM DEBUG_FILES_LIST APPEND ".dSYM")
    list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
    install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND tar acfv \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
  elseif (UNIX)
    list(TRANSFORM DEBUG_FILES_LIST APPEND ".dbg")
    list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
    install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND tar -I \"xz -9 -T0\" -cvf \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
  endif ()
endif ()
foreach (target IN LISTS BINARY_TARGETS)
  get_target_prefix(${target} target_prefix)
  foreach (extra_target IN LISTS EXTRA_TARGETS)
    get_target_prefix(${extra_target} extra_prefix)
    if (NOT "${target_prefix}" STREQUAL "${extra_prefix}")
      # Copy extra target to target prefix
      install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND cp \"${extra_prefix}$<TARGET_FILE_NAME:${extra_target}>\" \"${target_prefix}$<TARGET_FILE_NAME:${extra_target}>\")")
    endif ()
  endforeach ()
endforeach ()


================================================
FILE: CMakePresets.json
================================================
{
  "version": 2,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 20,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "debug",
      "hidden": true,
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Debug",
        "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDebugDLL"
      }
    },
    {
      "name": "relwithdebinfo",
      "hidden": true,
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "RelWithDebInfo",
        "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded",
        "SENTRY_DSN": "$env{SENTRY_DSN}"
      }
    },
    {
      "name": "linux-default",
      "displayName": "Linux (default)",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
        "USE_LTO": {
          "type": "BOOL",
          "value": false
        }
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "hostOS": [
            "Linux"
          ]
        },
        "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
          "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
        }
      }
    },
    {
      "name": "linux-default-debug",
      "displayName": "Linux (default) Debug",
      "inherits": [
        "debug",
        "linux-default"
      ]
    },
    {
      "name": "linux-default-relwithdebinfo",
      "displayName": "Linux (default) RelWithDebInfo",
      "inherits": [
        "relwithdebinfo",
        "linux-default"
      ]
    },
    {
      "name": "linux-clang",
      "displayName": "Linux (Clang)",
      "inherits": [
        "linux-default"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_COMPILER": "clang++"
      }
    },
    {
      "name": "linux-clang-debug",
      "displayName": "Linux (Clang) Debug",
      "inherits": [
        "debug",
        "linux-clang"
      ]
    },
    {
      "name": "linux-clang-relwithdebinfo",
      "displayName": "Linux (Clang) RelWithDebInfo",
      "inherits": [
        "relwithdebinfo",
        "linux-clang"
      ],
      "cacheVariables": {
        "USE_LTO": {
          "type": "BOOL",
          "value": true
        }
      }
    },
    {
      "name": "linux-clang-debug-asan",
      "displayName": "Linux (Clang) Debug w/ ASAN",
      "inherits": [
        "linux-clang-debug"
      ],
      "cacheVariables": {
        "METAFORCE_ASAN": {
          "type": "BOOL",
          "value": true
        }
      }
    },
    {
      "name": "linux-clang-relwithdebinfo-asan",
      "displayName": "Linux (Clang) RelWithDebInfo w/ ASAN",
      "inherits": [
        "linux-clang-relwithdebinfo"
      ],
      "cacheVariables": {
        "METAFORCE_ASAN": {
          "type": "BOOL",
          "value": true
        }
      }
    },
    {
      "name": "windows-msvc",
      "displayName": "Windows (MSVC)",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/out/build/${presetName}",
      "architecture": {
        "value": "x64",
        "strategy": "external"
      },
      "cacheVariables": {
        "CMAKE_C_COMPILER": "cl",
        "CMAKE_CXX_COMPILER": "cl",
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install",
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_TARGET_TRIPLET": "x64-windows-static",
        "VCPKG_SETUP_CMAKE_PROGRAM_PATH": {
          "type": "BOOL",
          "value": false
        }
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "hostOS": [
            "Windows"
          ]
        }
      }
    },
    {
      "name": "windows-msvc-debug",
      "displayName": "Windows (MSVC) Debug",
      "inherits": [
        "debug",
        "windows-msvc"
      ]
    },
    {
      "name": "windows-msvc-relwithdebinfo",
      "displayName": "Windows (MSVC) RelWithDebInfo",
      "inherits": [
        "relwithdebinfo",
        "windows-msvc"
      ]
    },
    {
      "name": "windows-clang",
      "displayName": "Windows (Clang)",
      "inherits": [
        "windows-msvc"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang-cl",
        "CMAKE_CXX_COMPILER": "clang-cl",
        "CMAKE_LINKER": "lld-link"
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "intelliSenseMode": "windows-clang-x64"
        }
      }
    },
    {
      "name": "windows-clang-debug",
      "displayName": "Windows (Clang) Debug",
      "inherits": [
        "debug",
        "windows-clang"
      ]
    },
    {
      "name": "windows-clang-relwithdebinfo",
      "displayName": "Windows (Clang) RelWithDebInfo",
      "inherits": [
        "relwithdebinfo",
        "windows-clang"
      ]
    },
    {
      "name": "macos-default",
      "displayName": "macOS (default)",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "hostOS": [
            "macOS"
          ]
        }
      }
    },
    {
      "name": "macos-default-debug",
      "displayName": "macOS (default) Debug",
      "inherits": [
        "debug",
        "macos-default"
      ]
    },
    {
      "name": "macos-default-relwithdebinfo",
      "displayName": "macOS (default) RelWithDebInfo",
      "inherits": [
        "relwithdebinfo",
        "macos-default"
      ]
    },
    {
      "name": "ios-default",
      "displayName": "iOS",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "inherits": [
        "relwithdebinfo"
      ],
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": "ios.toolchain.cmake",
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
        "PLATFORM": "OS64",
        "DEPLOYMENT_TARGET": "14.0",
        "ENABLE_BITCODE": {
          "type": "BOOL",
          "value": false
        },
        "Rust_CARGO_TARGET": "aarch64-apple-ios",
        "BUILD_SHARED_LIBS": {
          "type": "BOOL",
          "value": false
        },
        "IMGUI_USE_FREETYPE": {
          "type": "BOOL",
          "value": false
        },
        "CMAKE_DISABLE_FIND_PACKAGE_BZip2": {
          "type": "BOOL",
          "value": true
        },
        "CMAKE_DISABLE_FIND_PACKAGE_LibLZMA": {
          "type": "BOOL",
          "value": true
        },
        "CMAKE_DISABLE_FIND_PACKAGE_zstd": {
          "type": "BOOL",
          "value": true
        }
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "hostOS": [
            "macOS"
          ]
        }
      }
    },
    {
      "name": "tvos-default",
      "displayName": "tvOS",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "inherits": [
        "relwithdebinfo"
      ],
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": "ios.toolchain.cmake",
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
        "PLATFORM": "TVOS",
        "DEPLOYMENT_TARGET": "14.5",
        "ENABLE_BITCODE": {
          "type": "BOOL",
          "value": false
        },
        "Rust_CARGO_TARGET": "aarch64-apple-tvos",
        "Rust_TOOLCHAIN": "nightly",
        "BUILD_SHARED_LIBS": {
          "type": "BOOL",
          "value": false
        },
        "IMGUI_USE_FREETYPE": {
          "type": "BOOL",
          "value": false
        },
        "CMAKE_DISABLE_FIND_PACKAGE_BZip2": {
          "type": "BOOL",
          "value": true
        },
        "CMAKE_DISABLE_FIND_PACKAGE_LibLZMA": {
          "type": "BOOL",
          "value": true
        },
        "CMAKE_DISABLE_FIND_PACKAGE_zstd": {
          "type": "BOOL",
          "value": true
        }
      },
      "vendor": {
        "microsoft.com/VisualStudioSettings/CMake/1.0": {
          "hostOS": [
            "macOS"
          ]
        }
      }
    },
    {
      "name": "android-base",
      "hidden": true,
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "inherits": [
        "relwithdebinfo"
      ],
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
        "CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_HOME}/ndk/$env{ANDROID_NDK_VERSION}/build/cmake/android.toolchain.cmake",
        "ANDROID_PLATFORM": "android-24"
      }
    },
    {
      "name": "android-arm64",
      "displayName": "Android (arm64-v8a)",
      "inherits": [
        "android-base"
      ],
      "cacheVariables": {
        "ANDROID_ABI": "arm64-v8a"
      }
    },
    {
      "name": "android-x86_64",
      "displayName": "Android (x86_64)",
      "inherits": [
        "android-base"
      ],
      "cacheVariables": {
        "ANDROID_ABI": "x86_64"
      }
    },
    {
      "name": "x-linux-ci",
      "hidden": true,
      "inherits": [
        "relwithdebinfo"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
      }
    },
    {
      "name": "x-linux-ci-gcc",
      "inherits": [
        "x-linux-ci",
        "linux-default"
      ]
    },
    {
      "name": "x-linux-ci-clang",
      "inherits": [
        "x-linux-ci",
        "linux-clang"
      ]
    },
    {
      "name": "x-macos-ci",
      "inherits": [
        "macos-default-relwithdebinfo"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
      }
    },
    {
      "name": "x-ios-ci",
      "inherits": [
        "ios-default"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
      }
    },
    {
      "name": "x-tvos-ci",
      "inherits": [
        "tvos-default"
      ],
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
      }
    },
    {
      "name": "x-windows-ci",
      "hidden": true,
      "inherits": [
        "relwithdebinfo"
      ],
      "binaryDir": "$env{BUILD_DIR}",
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "$env{BUILD_DIR}/install",
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
        "CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded"
      }
    },
    {
      "name": "x-windows-ci-msvc",
      "inherits": [
        "x-windows-ci",
        "windows-msvc"
      ]
    },
    {
      "name": "x-windows-ci-clang",
      "inherits": [
        "x-windows-ci",
        "windows-clang"
      ]
    }
  ],
  "buildPresets": [
    {
      "name": "linux-default-debug",
      "configurePreset": "linux-default-debug",
      "description": "Linux (default) debug build",
      "displayName": "Linux (default) Debug"
    },
    {
      "name": "linux-default-relwithdebinfo",
      "configurePreset": "linux-default-relwithdebinfo",
      "description": "Linux (default) release build with debug info",
      "displayName": "Linux (default) RelWithDebInfo"
    },
    {
      "name": "linux-clang-debug",
      "configurePreset": "linux-clang-debug",
      "description": "Linux (Clang) debug build",
      "displayName": "Linux (Clang) Debug"
    },
    {
      "name": "linux-clang-relwithdebinfo",
      "configurePreset": "linux-clang-relwithdebinfo",
      "description": "Linux (Clang) release build with debug info",
      "displayName": "Linux (Clang) RelWithDebInfo"
    },
    {
      "name": "linux-clang-debug-asan",
      "configurePreset": "linux-clang-debug-asan",
      "description": "Linux (Clang) debug build w/ ASAN",
      "displayName": "Linux (Clang) Debug w/ ASAN"
    },
    {
      "name": "linux-clang-relwithdebinfo-asan",
      "configurePreset": "linux-clang-relwithdebinfo-asan",
      "description": "Linux (Clang) release build with debug info w/ ASAN",
      "displayName": "Linux (Clang) RelWithDebInfo w/ ASAN"
    },
    {
      "name": "macos-default-debug",
      "configurePreset": "macos-default-debug",
      "description": "macOS debug build",
      "displayName": "macOS Debug"
    },
    {
      "name": "macos-default-relwithdebinfo",
      "configurePreset": "macos-default-relwithdebinfo",
      "description": "macOS release build with debug info",
      "displayName": "macOS RelWithDebInfo"
    },
    {
      "name": "ios-default",
      "configurePreset": "ios-default",
      "description": "iOS release build with debug info",
      "displayName": "iOS RelWithDebInfo",
      "targets": [
        "metaforce"
      ]
    },
    {
      "name": "tvos-default",
      "configurePreset": "tvos-default",
      "description": "tvOS release build with debug info",
      "displayName": "tvOS RelWithDebInfo",
      "targets": [
        "metaforce"
      ]
    },
    {
      "name": "android-arm64",
      "configurePreset": "android-arm64",
      "description": "Android arm64-v8a release build with debug info",
      "displayName": "Android arm64-v8a RelWithDebInfo",
      "targets": [
        "metaforce"
      ]
    },
    {
      "name": "android-x86_64",
      "configurePreset": "android-x86_64",
      "description": "Android x86_64 release build with debug info",
      "displayName": "Android x86_64 RelWithDebInfo",
      "targets": [
        "metaforce"
      ]
    },
    {
      "name": "windows-msvc-debug",
      "configurePreset": "windows-msvc-debug",
      "description": "Windows (MSVC) debug build",
      "displayName": "Windows (MSVC) Debug"
    },
    {
      "name": "windows-msvc-relwithdebinfo",
      "configurePreset": "windows-msvc-relwithdebinfo",
      "description": "Windows (MSVC) release build with debug info",
      "displayName": "Windows (MSVC) RelWithDebInfo"
    },
    {
      "name": "windows-clang-debug",
      "configurePreset": "windows-clang-debug",
      "description": "Windows (Clang) debug build",
      "displayName": "Windows (Clang) Debug"
    },
    {
      "name": "windows-clang-relwithdebinfo",
      "configurePreset": "windows-clang-relwithdebinfo",
      "description": "Windows (Clang) release build with debug info",
      "displayName": "Windows (Clang) RelWithDebInfo"
    },
    {
      "name": "x-linux-ci-gcc",
      "configurePreset": "x-linux-ci-gcc",
      "description": "(Internal) Linux CI GCC",
      "displayName": "(Internal) Linux CI GCC",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-linux-ci-clang",
      "configurePreset": "x-linux-ci-clang",
      "description": "(Internal) Linux CI Clang",
      "displayName": "(Internal) Linux CI Clang",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-macos-ci",
      "configurePreset": "x-macos-ci",
      "description": "(Internal) macOS CI",
      "displayName": "(Internal) macOS CI",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-ios-ci",
      "configurePreset": "x-ios-ci",
      "description": "(Internal) iOS CI",
      "displayName": "(Internal) iOS CI",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-tvos-ci",
      "configurePreset": "x-tvos-ci",
      "description": "(Internal) tvOS CI",
      "displayName": "(Internal) tvOS CI",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-windows-ci-msvc",
      "configurePreset": "x-windows-ci-msvc",
      "description": "(Internal) Windows CI MSVC",
      "displayName": "(Internal) Windows CI MSVC",
      "targets": [
        "install"
      ]
    },
    {
      "name": "x-windows-ci-clang",
      "configurePreset": "x-windows-ci-clang",
      "description": "(Internal) Windows CI Clang",
      "displayName": "(Internal) Windows CI Clang",
      "targets": [
        "install"
      ]
    }
  ]
}


================================================
FILE: LICENSE
================================================
The MIT License

Copyright (c) 2015-2021 Metaforce Contributors
Original Authors: Jack Andersen and Phillip "Antidote" Stephens

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: NESEmulator/CMakeLists.txt
================================================
file(GLOB MAPPER_SRCS ../extern/fixNES/mapper/*.c)
add_library(NESEmulator CNESEmulator.hpp CNESEmulator.cpp malloc.h
        apu.c ../extern/fixNES/audio_fds.c ../extern/fixNES/audio_mmc5.c ../extern/fixNES/audio_vrc6.c
        ../extern/fixNES/audio_vrc7.c ../extern/fixNES/audio_n163.c ../extern/fixNES/audio_s5b.c
        ../extern/fixNES/cpu.c ppu.c ../extern/fixNES/mem.c ../extern/fixNES/input.c ../extern/fixNES/mapper.c
        ../extern/fixNES/mapperList.c ../extern/fixNES/fm2play.c ../extern/fixNES/vrc_irq.c ${MAPPER_SRCS})
target_include_directories(NESEmulator PRIVATE
        ${CMAKE_SOURCE_DIR}/DataSpec
        ${CMAKE_SOURCE_DIR}/Runtime
        ${CMAKE_SOURCE_DIR}/extern
        PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(NESEmulator PRIVATE COL_32BIT=1 COL_TEX_BSWAP=1)
target_link_libraries(NESEmulator RuntimeCommon)
if (NOT MSVC)
    target_compile_options(NESEmulator PRIVATE -Wno-implicit-fallthrough -Wno-format -Wno-pointer-compare
            -Wno-memset-elt-size)
endif ()


================================================
FILE: NESEmulator/CNESEmulator.cpp
================================================
#include "CNESEmulator.hpp"
#include "CGameState.hpp"
#include "Input/CFinalInput.hpp"
#include "Runtime/Logging.hpp"
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "malloc.h"
#include <cinttypes>
#include <cctype>
#include <ctime>
#include <cmath>

static metaforce::MP1::CNESEmulator* EmulatorInst = nullptr;

extern "C" {

#include "fixNES/mapper.h"
#include "fixNES/cpu.h"
#include "fixNES/ppu.h"
#include "fixNES/mem.h"
#include "fixNES/input.h"
#include "fixNES/fm2play.h"
#include "fixNES/apu.h"
#include "fixNES/audio_fds.h"
#include "fixNES/audio_vrc7.h"
#include "fixNES/mapper_h/nsf.h"

/*
 * Portions Copyright (C) 2017 - 2019 FIX94
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

#define DEBUG_HZ 0
#define DEBUG_MAIN_CALLS 0
#define DEBUG_KEY 0
#define DEBUG_LOAD_INFO 1

#if 0
#ifndef _WIN32
std::chrono::steady_clock::time_point s_tp = std::chrono::steady_clock::now();
static std::chrono::milliseconds::rep GetTickCount() {
  return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - s_tp).count();
}
#endif
#endif

const char *VERSION_STRING = "fixNES Alpha v1.2.7";
static char window_title[256];
static char window_title_pause[256];

enum {
  FTYPE_UNK = 0,
  FTYPE_NES,
  FTYPE_NSF,
  FTYPE_FDS,
  FTYPE_QD,
#if ZIPSUPPORT
  FTYPE_ZIP,
#endif
};

static int emuFileType = FTYPE_UNK;
static char emuFileName[1024];
uint8_t *emuNesROM = NULL;
uint32_t emuNesROMsize = 0;
#ifndef __LIBRETRO__
static char emuSaveName[1024];
#endif
uint8_t *emuPrgRAM = NULL;
uint32_t emuPrgRAMsize = 0;
//used externally
#ifdef COL_32BIT
uint32_t textureImage[0xF000];
#define TEXIMAGE_LEN VISIBLE_DOTS*VISIBLE_LINES*4
#ifdef COL_GL_BSWAP
#define GL_TEX_FMT GL_UNSIGNED_INT_8_8_8_8_REV
#else //no REVerse
#define GL_TEX_FMT GL_UNSIGNED_INT_8_8_8_8
#endif
#else //COL_16BIT
uint16_t textureImage[0xF000];
#define TEXIMAGE_LEN VISIBLE_DOTS*VISIBLE_LINES*2
#ifdef COL_GL_BSWAP
#define GL_TEX_FMT GL_UNSIGNED_SHORT_5_6_5_REV
#else //no REVerse
#define GL_TEX_FMT GL_UNSIGNED_SHORT_5_6_5
#endif
#endif
bool nesPause = false;
bool ppuDebugPauseFrame = false;
bool doOverscan = false;
bool nesPAL = false;
bool nesEmuNSFPlayback = false;
uint8_t emuInitialNT = NT_UNKNOWN;

// static bool inPause = false;
// static bool inOverscanToggle = false;
// static bool inResize = false;
// static bool inDiskSwitch = false;
// static bool inReset = false;

#if DEBUG_HZ
static int emuFrameStart = 0;
static int emuTimesCalled = 0;
static int emuTotalElapsed = 0;
#endif
#if DEBUG_MAIN_CALLS
static int emuMainFrameStart = 0;
static int emuMainTimesCalled = 0;
static int emuMainTimesSkipped = 0;
static int emuMainTotalElapsed = 0;
#endif

#define DOTS 341

#define VISIBLE_DOTS 256
#define VISIBLE_LINES 240

static uint32_t linesToDraw = VISIBLE_LINES;
static const uint32_t visibleImg = VISIBLE_DOTS * VISIBLE_LINES * 4;
// static uint8_t scaleFactor = 2;
static bool emuSaveEnabled = false;
static bool emuFdsHasSideB = false;

// static uint16_t ppuCycleTimer;
//static uint16_t ppuCycleTimer;
uint32_t cpuCycleTimer;
uint32_t vrc7CycleTimer;
//from input.c
extern uint8_t inValReads[8];
//from m30.c
extern bool m30_flashable;
extern bool m30_singlescreen;
//from m32.c
extern bool m32_singlescreen;
//from p16c8.c
extern bool m78_m78a;
//from ppu.c
extern bool ppuMapper5;

static volatile bool emuRenderFrame = false;
extern uint8_t audioExpansion;

// used externally
bool emuSkipVsync = false;
bool emuSkipFrame = false;

// static uint32_t mCycles = 0;

extern bool fdsSwitch;

uint32_t apuGetMaxBufSize();
void apuResetPos();
uint8_t* ppuGetVRAM();

int audioUpdate() {
  if (!EmulatorInst)
    return 0;
  return EmulatorInst->audioUpdate();
}
}

namespace metaforce::MP1 {

bool CNESEmulator::EmulatorConstructed = false;

#define NESEMUP_ROM_OFFSET 0xa3f8

#define METROID_PAL false
#define METROID_MAPPER 1
#define METROID_SAVE_ENABLED false
#define METROID_TRAINER false
#define METROID_PRG_SIZE (8 * 0x4000)
#define METROID_CHR_SIZE (0 * 0x2000)
#define METROID_PRG_RAM_SIZE 0x2000

CNESEmulator::CNESEmulator() {
  if (EmulatorConstructed)
    spdlog::fatal("Attempted constructing more than 1 CNESEmulator");
  EmulatorConstructed = true;

  CDvdFile NESEmuFile("NESemuP.rel");
  if (NESEmuFile) {
    m_nesEmuPBuf.reset(new u8[0x20000]);
    m_dvdReq = NESEmuFile.AsyncSeekRead(m_nesEmuPBuf.get(), 0x20000, ESeekOrigin::Begin, NESEMUP_ROM_OFFSET);
  } else {
    spdlog::fatal("Unable to open NESemuP.rel");
  }
}

void CNESEmulator::InitializeEmulator() {
  nesPause = false;
  ppuDebugPauseFrame = false;

  puts(VERSION_STRING);
  strcpy(window_title, VERSION_STRING);
  memset(textureImage, 0, visibleImg);
  emuFileType = FTYPE_UNK;
  memset(emuFileName, 0, 1024);
  memset(emuSaveName, 0, 1024);

  nesPAL = METROID_PAL;
  uint8_t mapper = METROID_MAPPER;
  emuSaveEnabled = METROID_SAVE_ENABLED;
  bool trainer = METROID_TRAINER;
  uint32_t prgROMsize = METROID_PRG_SIZE;
  uint32_t chrROMsize = METROID_CHR_SIZE;
  emuPrgRAMsize = METROID_PRG_RAM_SIZE;
  emuPrgRAM = (uint8_t*)malloc(emuPrgRAMsize);
  uint8_t* prgROM = emuNesROM;
  if (trainer) {
    memcpy(emuPrgRAM + 0x1000, prgROM, 0x200);
    prgROM += 512;
  }
  uint8_t* chrROM = NULL;
  if (chrROMsize) {
    chrROM = emuNesROM + prgROMsize;
    if (trainer)
      chrROM += 512;
  }
  apuInitBufs();
  cpuInit();
  ppuInit();
  memInit();
  apuInit();
  inputInit();
  ppuSetNameTblVertical();
#if DEBUG_LOAD_INFO
  printf("Used Mapper: %i\n", mapper);
  printf("PRG: 0x%x bytes PRG RAM: 0x%x bytes CHR: 0x%x bytes\n", prgROMsize, emuPrgRAMsize, chrROMsize);
#endif
  if (!mapperInit(mapper, prgROM, prgROMsize, emuPrgRAM, emuPrgRAMsize, chrROM, chrROMsize)) {
    printf("Mapper init failed!\n");
    return;
  }
#if DEBUG_LOAD_INFO
  printf("Trainer: %i Saving: %i VRAM Mode: Vertical\n", trainer, emuSaveEnabled);
#endif
  sprintf(window_title, "%s NES - %s\n", nesPAL ? "PAL" : "NTSC", VERSION_STRING);

  sprintf(window_title_pause, "%s (Pause)", window_title);
  sprintf(window_title_pause, "%s (Pause)", window_title);
#if DEBUG_HZ
  emuFrameStart = GetTickCount();
#endif
#if DEBUG_MAIN_CALLS
  emuMainFrameStart = GetTickCount();
#endif
  cpuCycleTimer = nesPAL ? 16 : 12;
  vrc7CycleTimer = 432 / cpuCycleTimer;
  // do one scanline per idle loop
  // ppuCycleTimer = nesPAL ? 5 : 4;
  // mainLoopRuns = nesPAL ? DOTS*ppuCycleTimer : DOTS*ppuCycleTimer;
  // mainLoopPos = mainLoopRuns;

//  CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx) {
//    // Nearest-neighbor FTW!
//    m_texture = ctx.newDynamicTexture(VISIBLE_DOTS, linesToDraw, boo::TextureFormat::RGBA8,
//                                      boo::TextureClampMode::ClampToEdgeNearest);
//    if (ctx.platform() == boo::IGraphicsDataFactory::Platform::OpenGL) {
//      Vert verts[4] = {
//          {{-1.f, -1.f, 0.f}, {0.f, 1.f}},
//          {{-1.f, 1.f, 0.f}, {0.f, 0.f}},
//          {{1.f, -1.f, 0.f}, {1.f, 1.f}},
//          {{1.f, 1.f, 0.f}, {1.f, 0.f}},
//      };
//      m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, verts, sizeof(Vert), 4);
//    } else {
//      Vert verts[4] = {
//          {{-1.f, 1.f, 0.f}, {0.f, 1.f}},
//          {{-1.f, -1.f, 0.f}, {0.f, 0.f}},
//          {{1.f, 1.f, 0.f}, {1.f, 1.f}},
//          {{1.f, -1.f, 0.f}, {1.f, 0.f}},
//      };
//      m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, verts, sizeof(Vert), 4);
//    }
//    m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
//    m_shadBind = CNESShader::BuildShaderDataBinding(ctx, m_vbo, m_uniBuf, m_texture);
//    return true;
//  } BooTrace);

  // double useFreq = 223740;
  double useFreq = apuGetFrequency();
  //m_booVoice = CAudioSys::GetVoiceEngine()->allocateNewStereoVoice(useFreq, this);
  //m_booVoice->start();
  uint32_t apuBufSz = apuGetMaxBufSize();
  m_audioBufBlock.reset(new u8[apuBufSz * NUM_AUDIO_BUFFERS]);
  memset(m_audioBufBlock.get(), 0, apuBufSz * NUM_AUDIO_BUFFERS);
  for (int i = 0; i < NUM_AUDIO_BUFFERS; ++i)
    m_audioBufs[i] = m_audioBufBlock.get() + apuBufSz * i;

  EmulatorInst = this;
}

void CNESEmulator::DeinitializeEmulator() {
  // printf("\n");
  emuRenderFrame = false;
  //m_booVoice->stop();
  //m_booVoice.reset();
  apuDeinitBufs();
  if (emuNesROM != NULL) {
    if (!nesEmuNSFPlayback && (audioExpansion & EXP_FDS)) {
      FILE* save = fopen(emuSaveName, "wb");
      if (save) {
        if (emuFdsHasSideB)
          fwrite(emuNesROM, 1, 0x20000, save);
        else
          fwrite(emuNesROM, 1, 0x10000, save);
        fclose(save);
      }
    }
  }
  if (emuPrgRAM != NULL) {
    if (emuSaveEnabled) {
      FILE* save = fopen(emuSaveName, "wb");
      if (save) {
        fwrite(emuPrgRAM, 1, emuPrgRAMsize, save);
        fclose(save);
      }
    }
    free(emuPrgRAM);
  }
  emuPrgRAM = NULL;
  // printf("Bye!\n");

  EmulatorInst = nullptr;
}

CNESEmulator::~CNESEmulator() {
  if (m_dvdReq)
    m_dvdReq->PostCancelRequest();
  if (EmulatorInst)
    DeinitializeEmulator();
  if (emuNesROM) {
    free(emuNesROM);
    emuNesROM = nullptr;
  }
  EmulatorConstructed = false;
}

int CNESEmulator::audioUpdate() {
  int origProcBufs = m_procBufs;

//  uint8_t* data = apuGetBuf();
//  if (data != NULL && m_procBufs) {
//    uint32_t apuBufSz = apuGetMaxBufSize();
//    uint32_t remBytes = apuGetBufSize();
//    while (remBytes != 0) {
//      size_t thisBytes = std::min(remBytes, apuBufSz - m_posInHeadBuf);
//      memmove(m_audioBufs[m_headBuf] + m_posInHeadBuf, data, thisBytes);
//      data += thisBytes;
//      m_posInHeadBuf += thisBytes;
//      if (m_posInHeadBuf == apuBufSz) {
//        m_posInHeadBuf = 0;
//        --m_procBufs;
//        ++m_headBuf;
//        if (m_headBuf == NUM_AUDIO_BUFFERS)
//          m_headBuf = 0;
//        // printf("PUSH\n");
//      }
//      remBytes -= thisBytes;
//    }
//  }
//
//  // if (!origProcBufs)
//  // printf("OVERRUN\n");
//
  return origProcBufs;
}

static constexpr uint32_t AudioFrameSz = 2 * sizeof(int16_t);

//size_t CNESEmulator::supplyAudio(boo::IAudioVoice& voice, size_t frames, int16_t* data) {
//  uint32_t remFrames = uint32_t(frames);
//  while (remFrames) {
//    if (m_posInTailBuf == apuGetMaxBufSize()) {
//      ++m_tailBuf;
//      if (m_tailBuf == NUM_AUDIO_BUFFERS)
//        m_tailBuf = 0;
//      m_posInTailBuf = 0;
//      ++m_procBufs;
//      // printf("POP\n");
//    }
//
//    if (m_procBufs == NUM_AUDIO_BUFFERS) {
//      memset(data, 0, remFrames * AudioFrameSz);
//      // printf("UNDERRUN\n");
//      return frames;
//    }
//
//    size_t copySz = std::min(apuGetMaxBufSize() - m_posInTailBuf, remFrames * AudioFrameSz);
//    memmove(data, m_audioBufs[m_tailBuf] + m_posInTailBuf, copySz);
//    data += copySz / sizeof(int16_t);
//    m_posInTailBuf += copySz;
//    remFrames -= copySz / AudioFrameSz;
//  }
//  return frames;
//}

void CNESEmulator::NesEmuMainLoop(bool forceDraw) {
  // int start = GetTickCount();
  int loopCount = 0;
  do {
    if (emuRenderFrame || nesPause) {
#if DEBUG_MAIN_CALLS
      emuMainTimesSkipped++;
#endif
      // printf("LC RENDER: %d\n", loopCount);
      // TODO TODO
//      m_texture->load(textureImage, visibleImg);
      emuRenderFrame = false;
      break;
    }
    ++loopCount;

    // main CPU clock
    if (!cpuCycle())
      exit(EXIT_SUCCESS);
    // run graphics
    ppuCycle();
    // run audio
    apuCycle();
    // mapper related irqs
    mapperCycle();
    // mCycles++;
    if (ppuDrawDone()) {
      // printf("%i\n",mCycles);
      // mCycles = 0;
#ifndef __LIBRETRO__
      emuRenderFrame = true;
#if 0
            if(fm2playRunning())
                fm2playUpdate();
#endif
#if DEBUG_HZ
      emuTimesCalled++;
      auto end = GetTickCount();
      emuTotalElapsed += end - emuFrameStart;
      if (emuTotalElapsed >= 1000) {
        printf("\r%iHz   ", emuTimesCalled);
        emuTimesCalled = 0;
        emuTotalElapsed = 0;
      }
      emuFrameStart = end;
#endif
      // update audio before drawing
      if (!apuUpdate()) {
        apuResetPos();
        break;
      }
      // glutPostRedisplay();
#if 0
            if(ppuDebugPauseFrame)
            {
                ppuDebugPauseFrame = false;
                nesPause = true;
            }
#endif
#endif
      if (nesEmuNSFPlayback)
        nsfVsync();

      // keep processing frames if audio buffers are underrunning
      if (emuSkipFrame)
        emuRenderFrame = false;

      continue;
    }
  } while (true);

#if 0
    int end = GetTickCount();
    printf("%dms %d %d\n", end - start, loopCount, m_procBufs);
#endif

#if DEBUG_MAIN_CALLS
  emuMainTimesCalled++;
  int end = GetTickCount();
  // printf("%dms\n", end - start);
  emuMainTotalElapsed += end - emuMainFrameStart;
  if (emuMainTotalElapsed >= 1000) {
    printf("\r%i calls, %i skips   ", emuMainTimesCalled, emuMainTimesSkipped);
    fflush(stdout);
    emuMainTimesCalled = 0;
    emuMainTimesSkipped = 0;
    emuMainTotalElapsed = 0;
  }
  emuMainFrameStart = end;
#endif
}

#if 0
static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst)
{
    memcpy(dst, src, 0x38);
    memcpy(dst+0x3A, src+0x38, 2);
    uint16_t cDiskPos = 0x3E;
    uint16_t cROMPos = 0x3A;
    do
    {
        if(src[cROMPos] != 0x03)
            break;
        memcpy(dst+cDiskPos, src+cROMPos, 0x10);
        uint16_t copySize = (*(uint16_t*)(src+cROMPos+0xD))+1;
        cDiskPos+=0x12;
        cROMPos+=0x10;
        memcpy(dst+cDiskPos, src+cROMPos, copySize);
        cDiskPos+=copySize+2;
        cROMPos+=copySize;
    } while(cROMPos < 0xFFDC && cDiskPos < 0xFFFF);
    printf("%04x -> %04x\n", cROMPos, cDiskPos);
}
#endif

struct BitstreamState {
  u8* rPos;
  int position = 0;
  int tmpBuf = 0;
  int decBit = 0;
  BitstreamState(u8* pos) : rPos(pos) {}
  void resetDecBit() { decBit = 0; }
  void runDecBit() {
    if (position == 0) {
      position = 8;
      tmpBuf = *rPos++;
    }
    decBit <<= 1;
    if (tmpBuf & 0x80)
      decBit |= 1;
    tmpBuf <<= 1;
    position--;
  }
};

// Based on https://gist.github.com/FIX94/7593640c5cee6c37e3b23e7fcf8fe5b7
void CNESEmulator::DecryptMetroid(u8* dataIn, u8* dataOut, u32 decLen, u8 decByte, u32 xorLen, u32 xorVal) {
  u32 i, j;
  // simple add obfuscation
  for (i = 0; i < 0x100; i++) {
    dataIn[i] += decByte;
    decByte = dataIn[i];
  }
  // flip the first 0x100 bytes around
  for (i = 0; i < 128; ++i)
    std::swap(dataIn[255 - i], dataIn[i]);
  // set up buffer pointers
  BitstreamState bState(dataIn + 0x100);
  // unscramble buffer
  for (i = 0; i < decLen; i++) {
    bState.resetDecBit();
    bState.runDecBit();
    if (bState.decBit) {
      bState.resetDecBit();
      for (j = 0; j < 8; j++)
        bState.runDecBit();
      dataOut[i] = dataIn[bState.decBit + 0x49];
    } else {
      bState.resetDecBit();
      bState.runDecBit();
      if (bState.decBit) {
        bState.resetDecBit();
        for (j = 0; j < 6; j++)
          bState.runDecBit();
        dataOut[i] = dataIn[bState.decBit + 9];
      } else {
        bState.resetDecBit();
        bState.runDecBit();
        if (bState.decBit) {
          bState.resetDecBit();
          for (j = 0; j < 3; j++)
            bState.runDecBit();
          dataOut[i] = dataIn[bState.decBit + 1];
        } else
          dataOut[i] = dataIn[bState.decBit];
      }
    }
  }
  // do checksum fixups
  unsigned int xorTmpVal = 0;
  for (i = 0; i < xorLen; i++) {
    xorTmpVal ^= dataOut[i];
    for (j = 0; j < 8; j++) {
      if (xorTmpVal & 1) {
        xorTmpVal >>= 1;
        xorTmpVal ^= xorVal;
      } else
        xorTmpVal >>= 1;
    }
  }
  // write in calculated checksum
  dataOut[xorLen - 1] = u8((xorTmpVal >> 8) & 0xFF);
  dataOut[xorLen - 2] = u8(xorTmpVal & 0xFF);
}

void CNESEmulator::ProcessUserInput(const CFinalInput& input, int) {
  if (input.ControllerIdx() != 0)
    return;

  if (GetPasswordEntryState() != EPasswordEntryState::NotPasswordScreen) {
    // Don't swap A/B
    inValReads[BUTTON_A] = input.DA() || input.DSpecialKey(ESpecialKey::Enter) ||
                           input.DMouseButton(EMouseButton::Primary);
    inValReads[BUTTON_B] = input.DB() || input.DSpecialKey(ESpecialKey::Esc);
  } else {
    // Prime controls (B jumps, A shoots)
    inValReads[BUTTON_B] = input.DA() || input.DY() || input.DMouseButton(EMouseButton::Primary);
    inValReads[BUTTON_A] = input.DB() || input.DX() || input.DKey(' ');
  }

  inValReads[BUTTON_UP] = input.DDPUp() || input.DLAUp();
  inValReads[BUTTON_DOWN] = input.DDPDown() || input.DLADown();
  inValReads[BUTTON_LEFT] = input.DDPLeft() || input.DLALeft();
  inValReads[BUTTON_RIGHT] = input.DDPRight() || input.DLARight();
  inValReads[BUTTON_SELECT] = input.DZ() || input.DSpecialKey(ESpecialKey::Tab);
  inValReads[BUTTON_START] = input.DStart() || input.DSpecialKey(ESpecialKey::Esc);
}

bool CNESEmulator::CheckForGameOver(const u8* vram, u8* passwordOut) {
  // "PASS WORD"
  if (memcmp(vram + 0x14B, "\x19\xa\x1c\x1c\xff\x20\x18\x1b\xd", 9))
    return false;

  int chOff = 0;
  int encOff = 0;
  u8 pwOut[18];
  for (int i = 0; i < 24; ++i) {
    u8 chName = vram[0x1A9 + chOff];
    ++chOff;
    if (chOff == 0x6 || chOff == 0x46)
      ++chOff; // mid-line space
    else if (chOff == 0xd)
      chOff = 64; // 2nd line

    if (chName > 0x3f)
      return false;

    switch (i & 0x3) {
    case 0:
      pwOut[encOff] = chName;
      break;
    case 1:
      pwOut[encOff] |= chName << 6;
      ++encOff;
      pwOut[encOff] = chName >> 2;
      break;
    case 2:
      pwOut[encOff] |= chName << 4;
      ++encOff;
      pwOut[encOff] = chName >> 4;
      break;
    case 3:
      pwOut[encOff] |= chName << 2;
      ++encOff;
      break;
    default:
      break;
    }
  }

  if (passwordOut)
    memmove(passwordOut, pwOut, 18);
  return true;
}

CNESEmulator::EPasswordEntryState CNESEmulator::CheckForPasswordEntryScreen(const u8* vram) {
  // "PASS WORD PLEASE"
  if (memcmp(vram + 0x88, "\x19\xa\x1c\x1c\xff\x20\x18\x1b\xd\xff\x19\x15\xe\xa\x1c\xe", 16))
    return EPasswordEntryState::NotPasswordScreen;

  for (int i = 0; i < 13; ++i)
    if (vram[0x109 + i] < 0x40 || vram[0x149 + i] < 0x40)
      return EPasswordEntryState::Entered;

  return EPasswordEntryState::NotEntered;
}

bool CNESEmulator::SetPasswordIntoEntryScreen(u8* vram, u8* wram, const u8* password) {
  if (CheckForPasswordEntryScreen(vram) != EPasswordEntryState::NotEntered)
    return false;

  int i;
  for (i = 0; i < 18; ++i)
    if (password[i])
      break;
  if (i == 18)
    return false;

  int encOff = 0;
  int chOff = 0;
  u32 lastWord = 0;
  for (i = 0; i < 24; ++i) {
    switch (i & 0x3) {
    case 0:
      lastWord = password[encOff];
      ++encOff;
      break;
    case 1:
      lastWord = (lastWord >> 6) | (u32(password[encOff]) << 2);
      ++encOff;
      break;
    case 2:
      lastWord = (lastWord >> 6) | (u32(password[encOff]) << 4);
      ++encOff;
      break;
    case 3:
      lastWord = (lastWord >> 6);
      break;
    default:
      break;
    }

    u8 chName = u8(lastWord & 0x3f);
    wram[0x99a + i] = chName;
    vram[0x109 + chOff] = chName;
    ++chOff;
    if (chOff == 0x6 || chOff == 0x46)
      ++chOff; // mid-line space
    else if (chOff == 0xd)
      chOff = 64; // 2nd line
  }

  return true;
}

void CNESEmulator::Update() {
  if (!EmulatorInst) {
    if (m_dvdReq && m_dvdReq->IsComplete()) {
      m_dvdReq.reset();
      emuNesROMsize = 0x20000;
      emuNesROM = (uint8_t*)malloc(emuNesROMsize);
      DecryptMetroid(m_nesEmuPBuf.get(), emuNesROM);
      m_nesEmuPBuf.reset();
      InitializeEmulator();
    }
  } else {
    if (nesPause) {
      DeinitializeEmulator();
      InitializeEmulator();
      return;
    }

    bool gameOver = CheckForGameOver(ppuGetVRAM(), x21_passwordFromNES);
    x34_passwordEntryState = CheckForPasswordEntryScreen(ppuGetVRAM());
    if (x34_passwordEntryState == EPasswordEntryState::NotEntered && x38_passwordPending) {
      SetPasswordIntoEntryScreen(ppuGetVRAM(), emuPrgRAM, x39_passwordToNES);
      x38_passwordPending = false;
    }
    if (gameOver && !x20_gameOver)
      for (int i = 0; i < 3; ++i) // Three draw loops to ensure password display
        NesEmuMainLoop(true);
    else
      NesEmuMainLoop();
    x20_gameOver = gameOver;
  }
}

static const float NESAspect = VISIBLE_DOTS / float(VISIBLE_LINES);

void CNESEmulator::Draw(const zeus::CColor& mulColor, bool filtering) {
  if (!EmulatorInst)
    return;

  float widthFac = NESAspect / CGraphics::GetViewportAspect();

  Uniform uniform = {zeus::CMatrix4f{}, mulColor};
  uniform.m_matrix[0][0] = widthFac;
//  m_uniBuf->load(&uniform, sizeof(Uniform));
//
//  CGraphics::SetShaderDataBinding(m_shadBind);
//  CGraphics::DrawArray(0, 4);
}

void CNESEmulator::LoadPassword(const u8* state) {
  memmove(x39_passwordToNES, state, 18);
  x38_passwordPending = true;
}

} // namespace metaforce::MP1


================================================
FILE: NESEmulator/CNESEmulator.hpp
================================================
#pragma once

#include "RetroTypes.hpp"
#include "zeus/CColor.hpp"
//#include "boo/graphicsdev/IGraphicsDataFactory.hpp"
#include "zeus/CMatrix4f.hpp"
#include "Runtime/Graphics/CGraphics.hpp"

namespace metaforce {
struct CFinalInput;
class IDvdRequest;

namespace MP1 {

#define NUM_AUDIO_BUFFERS 4

class CNESEmulator final {
public:
  enum class EPasswordEntryState { NotPasswordScreen, NotEntered, Entered };

private:
  static bool EmulatorConstructed;

  std::unique_ptr<u8[]> m_nesEmuPBuf;
  std::shared_ptr<IDvdRequest> m_dvdReq;

  struct Vert {
    zeus::CVector3f m_pos;
    zeus::CVector2f m_uv;
  };

  struct Uniform {
    zeus::CMatrix4f m_matrix;
    zeus::CColor m_color;
  };

  TGXTexObj m_texture;
//  boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
//  boo::ObjToken<boo::IGraphicsBufferS> m_vbo;
//  boo::ObjToken<boo::IShaderDataBinding> m_shadBind;

  std::unique_ptr<u8[]> m_audioBufBlock;
  u8* m_audioBufs[NUM_AUDIO_BUFFERS];
  uint32_t m_headBuf = 0;
  uint32_t m_tailBuf = 0;
  uint32_t m_procBufs = NUM_AUDIO_BUFFERS;
  uint32_t m_posInHeadBuf = 0;
  uint32_t m_posInTailBuf = 0;
  //boo::ObjToken<boo::IAudioVoice> m_booVoice;

  // void* x4_loadBuf;
  // void* x8_rom;
  // void* xc_state;
  // OSModuleInfo* x10_module = x4_loadBuf;
  // void* x14_bss;
  // void* x18_prgram;
  // void* x1c_wram;
  bool x20_gameOver = false;
  u8 x21_passwordFromNES[18];
  EPasswordEntryState x34_passwordEntryState = EPasswordEntryState::NotPasswordScreen;
  bool x38_passwordPending = false;
  u8 x39_passwordToNES[18];
  static void DecryptMetroid(u8* dataIn, u8* dataOut, u32 decLen = 0x20000, u8 decByte = 0xe9, u32 xorLen = 0x1FFFC,
                             u32 xorVal = 0xA663);
  void InitializeEmulator();
  void DeinitializeEmulator();
  void NesEmuMainLoop(bool forceDraw = false);
  static bool CheckForGameOver(const u8* vram, u8* passwordOut = nullptr);
  static EPasswordEntryState CheckForPasswordEntryScreen(const uint8_t* vram);
  static bool SetPasswordIntoEntryScreen(u8* vram, u8* wram, const u8* password);

public:
  CNESEmulator();
  ~CNESEmulator();
  void ProcessUserInput(const CFinalInput& input, int);
  void Update();
  void Draw(const zeus::CColor& mulColor, bool filtering);
  void LoadPassword(const u8* state);
  const u8* GetPassword() const { return x21_passwordFromNES; }
  bool IsGameOver() const { return x20_gameOver; }
  EPasswordEntryState GetPasswordEntryState() const { return x34_passwordEntryState; }

  int audioUpdate();
  //void preSupplyAudio(boo::IAudioVoice& voice, double dt) {}
  //size_t supplyAudio(boo::IAudioVoice& voice, size_t frames, int16_t* data);
};

} // namespace MP1
} // namespace metaforce


================================================
FILE: NESEmulator/apu.c
================================================
#include "fixNES/apu.c"

uint32_t apuGetMaxBufSize()
{
    return apu.BufSizeBytes;
}

void apuResetPos()
{
    apu.curBufPos = 0;
}


================================================
FILE: NESEmulator/malloc.h
================================================
#ifndef URDE_NESEMULATOR_MALLOC_H
#define URDE_NESEMULATOR_MALLOC_H

#ifdef __APPLE__
#include <stdlib.h>
#elif _WIN32
#include <../ucrt/malloc.h>
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Winclude-next-absolute-path"
#include_next <malloc.h>
#pragma GCC diagnostic pop
#endif

#endif // URDE_NESEMULATOR_MALLOC_H


================================================
FILE: NESEmulator/ppu.c
================================================
#include "fixNES/ppu.c"

uint8_t* ppuGetVRAM()
{
    return ppu.VRAM;
}


================================================
FILE: README.md
================================================
## Metaforce [![Build Status]][actions] [![Discord Badge]][discord]

[Build Status]: https://github.com/AxioDL/metaforce/actions/workflows/build.yml/badge.svg
[actions]: https://github.com/AxioDL/metaforce/actions
[Discord Badge]: https://dcbadge.vercel.app/api/server/AMBVFuf?style=flat
[discord]: https://discord.gg/AMBVFuf

A reverse-engineered, native reimplementation of Metroid Prime.

This project is currently in **alpha** state.
Builds are currently unavailable while the project undergoes large changes.

Separately, a [matching decompilation](https://github.com/PrimeDecomp/prime) of Metroid Prime is currently underway. Contributions are welcome.
Progress on the decompilation benefits Metaforce with bug fixes and new implementations.

![Metaforce screenshot](assets/metaforce-screen1.png)

### Platform Support
* Windows 10+ (64-bit, D3D12 / Vulkan / OpenGL)
* macOS 10.15+ (Metal)
* Linux (Vulkan / OpenGL)
    * Follow [this guide](https://github.com/lutris/docs/blob/master/InstallingDrivers.md) to set up Vulkan & appropriate drivers for your distro.

### Usage

Windows:
- Open `metaforce.exe`

macOS:
- Open `Metaforce.app`

Linux:
- Ensure AppImage is marked as executable: `chmod +x Metaforce-*.AppImage`
- Open `Metaforce-*.AppImage`

#### CLI options (non-exhaustive)

* `-l`: Enable console logging
* `--warp [worldid] [areaid]`: Warp to a specific world/area. Example: `--warp 2 2`
* `+developer=1`: Enable developer UI

### Build Prerequisites:
* [CMake 3.25+](https://cmake.org)
    * Windows: Install `CMake Tools` in Visual Studio
    * macOS: `brew install cmake`
* [Python 3+](https://python.org)
    * Windows: [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640)
        * Verify it's added to `%PATH%` by typing `python` in `cmd`.
    * macOS: `brew install python@3`
* **[Windows]** [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
    * Select `C++ Development` and verify the following packages are included:
        * `Windows 10 SDK`
        * `CMake Tools`
        * `C++ Clang Compiler`
        * `C++ Clang-cl`
* **[macOS]** [Xcode 11.5+](https://developer.apple.com/xcode/download/)
* **[Linux]** Actively tested on Ubuntu 20.04, Arch Linux & derivatives.
    * Ubuntu 20.04+ packages
      ```
      build-essential curl git ninja-build clang lld zlib1g-dev libcurl4-openssl-dev \
      libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev libpulse-dev \
      libudev-dev libpng-dev libncurses5-dev cmake libx11-xcb-dev python3 python-is-python3 \
      libclang-dev libfreetype-dev libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev
      ```
     * Arch Linux packages
       ```
       base-devel cmake ninja llvm vulkan-headers python python-markupsafe clang lld alsa-lib libpulse libxrandr freetype2
       ```
     * Fedora packages
       ```
       cmake vulkan-headers ninja-build clang-devel llvm-devel libpng-devel
       ```
         * It's also important that you install the developer tools and libraries
           ```
           sudo dnf groupinstall "Development Tools" "Development Libraries"
           ```
### Prep Directions

```sh
git clone --recursive https://github.com/AxioDL/metaforce.git
cd metaforce
```

### Update Directions

```sh
cd metaforce
git pull
git submodule update --recursive
```

### Build Directions

For Windows, it's recommended to use Visual Studio. See below.

#### ninja (Windows/macOS/Linux)

Builds using `RelWithDebInfo` by default.

```sh
cmake -B out -G Ninja # add extra options here
cmake --build out --target metaforce hecl visigen
```

#### CMake configure options
- Build in debug mode (slower runtime speed, better backtraces): `-DCMAKE_BUILD_TYPE=Debug`
- Use clang+lld (faster linking): `-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++`
- Optimize for current CPU (resulting binaries are not portable): `-DMETAFORCE_VECTOR_ISA=native`

#### CLion (Windows/macOS/Linux)
*(main development / debugging IDE)*

Open the repository's `CMakeLists.txt`.

Optionally configure CMake options via `File` > `Settings` > `Build, Execution, Deployment` > `CMake`.

#### Qt Creator (Windows/macOS/Linux)

Open the repository's `CMakeLists.txt` via File > Open File or Project.

Configure the desired CMake targets to build in the *Projects* area of the IDE.

#### Visual Studio (Windows)

Verify all required VS packages are installed from the above **Build Prerequisites** section.

Open the `metaforce` directory in Visual Studio (imports CMake configuration).

MSVC and clang-cl configurations should import automatically.

#### Xcode (macOS)

```sh
cmake -G Xcode ../metaforce
```

Then open `metaforce.xcodeproj`


================================================
FILE: Runtime/Audio/CAudioGroupSet.cpp
================================================
#include "Runtime/Audio/CAudioGroupSet.hpp"

#include <cstring>

namespace metaforce {
/*
amuse::AudioGroupData CAudioGroupSet::LoadData() {
  const auto readU32 = [](const u8* ptr) {
    uint32_t value;
    std::memcpy(&value, ptr, sizeof(value));
    return SBig(value);
  };

  CMemoryInStream r(m_buffer.get(), INT32_MAX, CMemoryInStream::EOwnerShip::NotOwned);
  x10_baseName = r.Get<std::string>();
  x20_name = r.Get<std::string>();

  u8* buf = m_buffer.get() + r.GetReadPosition();
  const uint32_t poolLen = readU32(buf);
  unsigned char* pool = buf + 4;
  buf += poolLen + 4;
  const uint32_t projLen = readU32(buf);
  unsigned char* proj = buf + 4;
  buf += projLen + 4;
  const uint32_t sampLen = readU32(buf);
  unsigned char* samp = buf + 4;
  buf += sampLen + 4;
  const uint32_t sdirLen = readU32(buf);
  unsigned char* sdir = buf + 4;

  return {proj, projLen, pool, poolLen, sdir, sdirLen, samp, sampLen, amuse::GCNDataTag{}};
}
*/
CAudioGroupSet::CAudioGroupSet(std::unique_ptr<u8[]>&& in) : m_buffer(std::move(in)) {}

CFactoryFnReturn FAudioGroupSetDataFactory(const metaforce::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
                                           const metaforce::CVParamTransfer& vparms, CObjectReference* selfRef) {
  return TToken<CAudioGroupSet>::GetIObjObjectFor(std::make_unique<CAudioGroupSet>(std::move(in)));
}

} // namespace metaforce


================================================
FILE: Runtime/Audio/CAudioGroupSet.hpp
================================================
#pragma once

#include <memory>
#include <string>

#include "Runtime/CFactoryMgr.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/IObj.hpp"
#include "Runtime/RetroTypes.hpp"

//#include <amuse/AudioGroupData.hpp>

namespace metaforce {

class CAudioGroupSet {
  std::unique_ptr<u8[]> m_buffer;
  std::string x10_baseName;
  std::string x20_name;
//  amuse::AudioGroupData m_data;
//  amuse::AudioGroupData LoadData();

public:
  explicit CAudioGroupSet(std::unique_ptr<u8[]>&& in);
  //const amuse::AudioGroupData& GetAudioGroupData() const { return m_data; }
  std::string_view GetName() const { return x20_name; }
};

CFactoryFnReturn FAudioGroupSetDataFactory(const metaforce::SObjectTag& tag, std::unique_ptr<u8[]>&& in, u32 len,
                                           const metaforce::CVParamTransfer& vparms, CObjectReference* selfRef);

} // namespace metaforce


================================================
FILE: Runtime/Audio/CAudioSys.cpp
================================================
#include "Runtime/Audio/CAudioSys.hpp"

#include <string>
#include <unordered_map>

#include "Runtime/CSimplePool.hpp"
#include "Runtime/Audio/CAudioGroupSet.hpp"

namespace metaforce {
namespace {
std::unordered_map<std::string, TLockedToken<CAudioGroupSet>> mpGroupSetDB;
std::unordered_map<CAssetId, std::string> mpGroupSetResNameDB;
constexpr std::string_view mpDefaultInvalidString = "NULL";

float s_MasterVol = 1.f;
float s_SfxVol = 1.f;

s16 s_VolumeScale = 0x7f;
s16 s_DefaultVolumeScale = 0x7f;
} // Anonymous namespace

CAudioSys* CAudioSys::g_SharedSys = nullptr;

TLockedToken<CAudioGroupSet> CAudioSys::FindGroupSet(std::string_view name) {
  // TODO: Heterogeneous lookup when C++20 available
  auto search = mpGroupSetDB.find(name.data());
  if (search == mpGroupSetDB.cend())
    return {};
  return search->second;
}

std::string_view CAudioSys::SysGetGroupSetName(CAssetId id) {
  auto search = mpGroupSetResNameDB.find(id);
  if (search == mpGroupSetResNameDB.cend())
    return mpDefaultInvalidString;
  return search->second;
}

bool CAudioSys::SysLoadGroupSet(CSimplePool* pool, CAssetId id) {
  if (!FindGroupSet(SysGetGroupSetName(id))) {
    TLockedToken<CAudioGroupSet> set = pool->GetObj(SObjectTag{FOURCC('AGSC'), id});
    mpGroupSetDB.emplace(set->GetName(), set);
    mpGroupSetResNameDB.emplace(id, set->GetName());
    return false;
  } else {
    return true;
  }
}

bool CAudioSys::SysLoadGroupSet(const TLockedToken<CAudioGroupSet>& set, std::string_view name, CAssetId id) {
  if (!FindGroupSet(name)) {
    mpGroupSetDB.emplace(set->GetName(), set);
    mpGroupSetResNameDB.emplace(id, set->GetName());
    return false;
  } else {
    return true;
  }
}

void CAudioSys::SysUnloadAudioGroupSet(std::string_view name) {
  auto set = FindGroupSet(name);
  if (!set)
    return;

  mpGroupSetDB.erase(name.data());
  mpGroupSetResNameDB.erase(set.GetObjectTag()->id);
}

bool CAudioSys::SysIsGroupSetLoaded(std::string_view name) { return FindGroupSet(name).operator bool(); }

void CAudioSys::SysAddGroupIntoAmuse(std::string_view name) {
}

void CAudioSys::SysRemoveGroupFromAmuse(std::string_view name) {
}

void CAudioSys::_UpdateVolume() {  }

void CAudioSys::SysSetVolume(u8 volume) {
  s_MasterVol = volume / 127.f;
  _UpdateVolume();
}

void CAudioSys::SysSetSfxVolume(u8 volume, u16 time, bool music, bool fx) {
  s_SfxVol = volume / 127.f;
  _UpdateVolume();
}

s16 CAudioSys::GetDefaultVolumeScale() { return s_DefaultVolumeScale; }

void CAudioSys::SetDefaultVolumeScale(s16 scale) { s_DefaultVolumeScale = scale; }

void CAudioSys::SetVolumeScale(s16 scale) { s_VolumeScale = scale; }

} // namespace metaforce


================================================
FILE: Runtime/Audio/CAudioSys.hpp
================================================
#pragma once

#include "Runtime/CToken.hpp"
#include "Runtime/GCNTypes.hpp"
#include "Runtime/RetroTypes.hpp"

//#include <amuse/amuse.hpp>
//#include <boo/audiodev/IAudioVoiceEngine.hpp>
#include <zeus/CVector3f.hpp>

namespace metaforce {
class CAudioGroupSet;
class CSimplePool;

CFactoryFnReturn FAudioTranslationTableFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,
                                               CObjectReference* selfRef);

class CAudioSys {
public:
  enum class ESurroundModes { Mono, Stereo, Surround };

private:
  static CAudioSys* g_SharedSys;
  static void _UpdateVolume();

public:
  struct C3DEmitterParmData {
    zeus::CVector3f x0_pos;
    zeus::CVector3f xc_dir;
    float x18_maxDist;
    float x1c_distComp;
    u32 x20_flags;
    u16 x24_sfxId;
    float x26_maxVol;
    float x27_minVol;
    bool x28_important; // Can't be allocated over, regardless of priority
    u8 x29_prio;
  };
  CAudioSys(u8, u8, u8, u8, u32) {
    g_SharedSys = this;
  }
  ~CAudioSys() { g_SharedSys = nullptr; }

  static void SetSurroundMode(ESurroundModes mode) {}
  static TLockedToken<CAudioGroupSet> FindGroupSet(std::string_view name);
  static std::string_view SysGetGroupSetName(CAssetId id);
  static bool SysLoadGroupSet(CSimplePool* pool, CAssetId id);
  static bool SysLoadGroupSet(const TLockedToken<CAudioGroupSet>& set, std::string_view name, CAssetId id);
  static void SysUnloadAudioGroupSet(std::string_view name);
  static bool SysIsGroupSetLoaded(std::string_view name);
  static void SysAddGroupIntoAmuse(std::string_view name);
  static void SysRemoveGroupFromAmuse(std::string_view name);
  static void SysSetVolume(u8 volume);
  static void SysSetSfxVolume(u8 volume, u16 time, bool music, bool fx);

  static s16 GetDefaultVolumeScale();
  static void SetDefaultVolumeScale(s16 scale);
  static void SetVolumeScale(s16 scale);
};

} // namespace metaforce


================================================
FILE: Runtime/Audio/CMakeLists.txt
================================================
set(AUDIO_SOURCES
        CAudioSys.hpp CAudioSys.cpp
        CAudioGroupSet.hpp CAudioGroupSet.cpp
        CSfxManager.hpp CSfxManager.cpp
        CMidiManager.hpp CMidiManager.cpp
        CStaticAudioPlayer.hpp CStaticAudioPlayer.cpp
        CStreamAudioManager.hpp CStreamAudioManager.cpp
        g721.c g721.h)

runtime_add_list(Audio AUDIO_SOURCES)


================================================
FILE: Runtime/Audio/CMidiManager.cpp
================================================
#include "Runtime/Audio/CMidiManager.hpp"

#include "Runtime/Streams/CInputStream.hpp"

namespace metaforce {

std::unordered_set<CMidiHandle> CMidiManager::m_MidiWrappers = {};

void CMidiManager::StopAll() {
  for (auto it = m_MidiWrappers.begin(); it != m_MidiWrappers.end();)
    it = Stop(it, 0.f);
}

void CMidiManager::Stop(const CMidiHandle& handle, float fadeTime) {
//  handle->GetAudioSysHandle()->stopSong(fadeTime);
//  m_MidiWrappers.erase(handle);
}

std::unordered_set<CMidiHandle>::iterator CMidiManager::Stop(std::unordered_set<CMidiHandle>::iterator handle,
                                                             float fadeTime) {
//  const CMidiHandle& h = *handle;
//  h->GetAudioSysHandle()->stopSong(fadeTime);
  return m_MidiWrappers.erase(handle);
}

CMidiHandle CMidiManager::Play(const CMidiData& data, float fadeTime, bool stopExisting, float volume) {
  if (stopExisting)
    for (auto it = m_MidiWrappers.begin(); it != m_MidiWrappers.end();)
      it = Stop(it, fadeTime);

  CMidiHandle handle = *m_MidiWrappers.insert(std::make_shared<CMidiWrapper>()).first;
//  handle->SetAudioSysHandle(
//      CAudioSys::GetAmuseEngine().seqPlay(data.GetGroupId(), data.GetSetupId(), data.GetArrData()));
//  handle->GetAudioSysHandle()->setVolume(volume, fadeTime);
//  handle->SetSongId(data.GetSetupId());
  return handle;
}

CMidiManager::CMidiData::CMidiData(CInputStream& in) {
  in.ReadLong();
  x0_setupId = in.ReadLong();
  x2_groupId = in.ReadLong();
  x4_agscId = in.Get<CAssetId>();
  u32 length = in.ReadLong();
  x8_arrData.reset(new u8[length]);
  in.ReadBytes(reinterpret_cast<char*>(x8_arrData.get()), length);
}

CFactoryFnReturn FMidiDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& parms,
                                  CObjectReference* selfRef) {
  return TToken<CMidiManager::CMidiData>::GetIObjObjectFor(std::make_unique<CMidiManager::CMidiData>(in));
}

} // namespace metaforce


================================================
FILE: Runtime/Audio/CMidiManager.hpp
================================================
#pragma once

#include <memory>

#include "Runtime/Audio/CSfxManager.hpp"

namespace metaforce {

class CMidiManager {
public:
  class CMidiData {
    u16 x0_setupId;
    u16 x2_groupId;
    CAssetId x4_agscId;
    std::unique_ptr<u8[]> x8_arrData;

  public:
    u16 GetSetupId() const { return x0_setupId; }
    u16 GetGroupId() const { return x2_groupId; }
    CAssetId GetAGSCAssetId() const { return x4_agscId; }
    const u8* GetArrData() const { return x8_arrData.get(); }
    explicit CMidiData(CInputStream& in);
  };

  class CMidiWrapper {
    //amuse::ObjToken<amuse::Sequencer> x0_sequencer;
    // CSfxHandle x4_handle;
    u16 x8_songId;
    bool xa_available = true;

  public:
    //amuse::ObjToken<amuse::Sequencer> GetAudioSysHandle() const { return x0_sequencer; }
    //void SetAudioSysHandle(amuse::ObjToken<amuse::Sequencer> sequencer) { x0_sequencer = std::move(sequencer); }
    // const CSfxHandle& GetManagerHandle() const { return x4_handle; }
    // void SetMidiHandle(const CSfxHandle& handle) { x4_handle = handle; }
    bool IsAvailable() const { return xa_available; }
    void SetAvailable(bool available) { xa_available = available; }
    u16 GetSongId() const { return x8_songId; }
    void SetSongId(u16 songId) { x8_songId = songId; }
  };
  using CMidiHandle = std::shared_ptr<CMidiWrapper>;

  static void StopAll();
  static void Stop(const CMidiHandle& handle, float fadeTime);
  static std::unordered_set<CMidiHandle>::iterator Stop(std::unordered_set<CMidiHandle>::iterator handle,
                                                        float fadeTime);
  static CMidiHandle Play(const CMidiData& data, float fadeTime, bool stopExisting, float volume);

private:
  static std::unordered_set<CMidiHandle> m_MidiWrappers;
};

CFactoryFnReturn FMidiDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& parms,
                                  CObjectReference* selfRef);

using CMidiHandle = CMidiManager::CMidiHandle;

} // namespace metaforce


================================================
FILE: Runtime/Audio/CSfxManager.cpp
================================================
#include "Runtime/Audio/CSfxManager.hpp"
#include "Runtime/Streams/CInputStream.hpp"

#include "Runtime/CSimplePool.hpp"

namespace metaforce {
static TLockedToken<std::vector<u16>> mpSfxTranslationTableTok;
std::vector<u16>* CSfxManager::mpSfxTranslationTable = nullptr;

//static amuse::EffectReverbHiInfo s_ReverbHiQueued;
//static amuse::EffectChorusInfo s_ChorusQueued;
//static amuse::EffectReverbStdInfo s_ReverbStdQueued;
//static amuse::EffectDelayInfo s_DelayQueued;
//
//static amuse::EffectReverbHi* s_ReverbHiState = nullptr;
//static amuse::EffectChorus* s_ChorusState = nullptr;
//static amuse::EffectReverbStd* s_ReverbStdState = nullptr;
//static amuse::EffectDelay* s_DelayState = nullptr;

CFactoryFnReturn FAudioTranslationTableFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms,
                                               CObjectReference* selfRef) {
  std::unique_ptr<std::vector<u16>> obj = std::make_unique<std::vector<u16>>();
  u32 count = in.ReadLong();
  obj->reserve(count);
  for (u32 i = 0; i < count; ++i)
    obj->push_back(in.ReadShort());
  return TToken<std::vector<u16>>::GetIObjObjectFor(std::move(obj));
}

std::array<CSfxManager::CSfxChannel, 4> CSfxManager::m_channels;
CSfxManager::ESfxChannels CSfxManager::m_currentChannel = CSfxManager::ESfxChannels::Default;
bool CSfxManager::m_doUpdate;
void* CSfxManager::m_usedSounds;
bool CSfxManager::m_muted;
bool CSfxManager::m_auxProcessingEnabled = false;
float CSfxManager::m_reverbAmount = 1.f;
CSfxManager::EAuxEffect CSfxManager::m_activeEffect = CSfxManager::EAuxEffect::None;
CSfxManager::EAuxEffect CSfxManager::m_nextEffect = CSfxManager::EAuxEffect::None;
//amuse::ObjToken<amuse::Listener> CSfxManager::m_listener;

u16 CSfxManager::kMaxPriority;
u16 CSfxManager::kMedPriority;
u16 CSfxManager::kInternalInvalidSfxId;
u32 CSfxManager::kAllAreas;

bool CSfxManager::LoadTranslationTable(CSimplePool* pool, const SObjectTag* tag) {
  if (!tag)
    return false;
  mpSfxTranslationTable = nullptr;
  mpSfxTranslationTableTok = pool->GetObj(*tag);
  if (!mpSfxTranslationTableTok)
    return false;
  return true;
}

bool CSfxManager::CSfxWrapper::IsPlaying() const {
//  if (CBaseSfxWrapper::IsPlaying() && x1c_voiceHandle)
//    return x1c_voiceHandle->state() == amuse::VoiceState::Playing;
  return false;
}

void CSfxManager::CSfxWrapper::Play() {
//  x1c_voiceHandle = CAudioSys::GetAmuseEngine().fxStart(x18_sfxId, x20_vol, x22_pan);
//  if (x1c_voiceHandle) {
//    if (CSfxManager::IsAuxProcessingEnabled() && UseAcoustics())
//      x1c_voiceHandle->setReverbVol(m_reverbAmount);
//    SetPlaying(true);
//  }
  x24_ready = false;
}

void CSfxManager::CSfxWrapper::Stop() {
//  if (x1c_voiceHandle) {
//    x1c_voiceHandle->keyOff();
//    SetPlaying(false);
//    x1c_voiceHandle.reset();
//  }
}

bool CSfxManager::CSfxWrapper::Ready() {
  if (IsLooped())
    return true;
  return x24_ready;
}

u16 CSfxManager::CSfxWrapper::GetSfxId() const { return x18_sfxId; }

void CSfxManager::CSfxWrapper::UpdateEmitterSilent() {
//  if (x1c_voiceHandle)
//    x1c_voiceHandle->setVolume(1.f / 127.f);
}

void CSfxManager::CSfxWrapper::UpdateEmitter() {
//  if (x1c_voiceHandle)
//    x1c_voiceHandle->setVolume(x20_vol);
}

void CSfxManager::CSfxWrapper::SetReverb(float rev) {
//  if (x1c_voiceHandle && IsAuxProcessingEnabled() && UseAcoustics())
//    x1c_voiceHandle->setReverbVol(rev);
}

bool CSfxManager::CSfxEmitterWrapper::IsPlaying() const {
  if (IsLooped())
    return CBaseSfxWrapper::IsPlaying();
//  if (CBaseSfxWrapper::IsPlaying() && x50_emitterHandle)
//    return x50_emitterHandle->getVoice()->state() == amuse::VoiceState::Playing;
  return false;
}

void CSfxManager::CSfxEmitterWrapper::Play() {
  if (CSfxManager::IsAuxProcessingEnabled() && UseAcoustics())
    x1a_reverb = m_reverbAmount;
  else
    x1a_reverb = 0.f;

//  zeus::simd_floats pos(x24_parmData.x0_pos.mSimd);
//  zeus::simd_floats dir(x24_parmData.xc_dir.mSimd);
//  x50_emitterHandle = CAudioSys::GetAmuseEngine().addEmitter(
//      pos.data(), dir.data(), x24_parmData.x18_maxDist, x24_parmData.x1c_distComp, x24_parmData.x24_sfxId,
//      x24_parmData.x27_minVol, x24_parmData.x26_maxVol, (x24_parmData.x20_flags & 0x8) != 0);
//
//  if (x50_emitterHandle)
//    SetPlaying(true);
  x54_ready = false;
}

void CSfxManager::CSfxEmitterWrapper::Stop() {
//  if (x50_emitterHandle) {
//    x50_emitterHandle->getVoice()->keyOff();
//    SetPlaying(false);
//    x50_emitterHandle.reset();
//  }
}

bool CSfxManager::CSfxEmitterWrapper::Ready() {
  if (IsLooped())
    return true;
  return x54_ready;
}

CSfxManager::ESfxAudibility CSfxManager::CSfxEmitterWrapper::GetAudible(const zeus::CVector3f& vec) {
  float magSq = (x24_parmData.x0_pos - vec).magSquared();
  float maxDist = x24_parmData.x18_maxDist * x24_parmData.x18_maxDist;
  if (magSq < maxDist * 0.25f)
    return ESfxAudibility::Aud3;
  else if (magSq < maxDist * 0.5f)
    return ESfxAudibility::Aud2;
  else if (magSq < maxDist)
    return ESfxAudibility::Aud1;
  return ESfxAudibility::Aud0;
}

u16 CSfxManager::CSfxEmitterWrapper::GetSfxId() const { return x24_parmData.x24_sfxId; }

void CSfxManager::CSfxEmitterWrapper::UpdateEmitterSilent() {
//  if (x50_emitterHandle) {
//    zeus::simd_floats pos(x24_parmData.x0_pos.mSimd);
//    zeus::simd_floats dir(x24_parmData.xc_dir.mSimd);
//    x50_emitterHandle->setVectors(pos.data(), dir.data());
//    x50_emitterHandle->setMaxVol(1.f / 127.f);
//  }
  x55_cachedMaxVol = x24_parmData.x26_maxVol;
}

void CSfxManager::CSfxEmitterWrapper::UpdateEmitter() {
//  if (x50_emitterHandle) {
//    zeus::simd_floats pos(x24_parmData.x0_pos.mSimd);
//    zeus::simd_floats dir(x24_parmData.xc_dir.mSimd);
//    x50_emitterHandle->setVectors(pos.data(), dir.data());
//    x50_emitterHandle->setMaxVol(x55_cachedMaxVol);
//  }
}

void CSfxManager::CSfxEmitterWrapper::SetReverb(float rev) {
  if (IsAuxProcessingEnabled() && UseAcoustics())
    x1a_reverb = rev;
}

void CSfxManager::SetChannel(ESfxChannels chan) {
  if (m_currentChannel == chan)
    return;
  if (m_currentChannel != ESfxChannels::Invalid)
    TurnOffChannel(m_currentChannel);
  TurnOnChannel(chan);
  m_currentChannel = chan;
}

void CSfxManager::KillAll(ESfxChannels chan) {
  CSfxChannel& chanObj = m_channels[size_t(chan)];
  for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
    const CSfxHandle& handle = *it;
    handle->Stop();
    handle->Release();
    handle->Close();
    it = chanObj.x48_handles.erase(it);
  }
}

void CSfxManager::TurnOnChannel(ESfxChannels chan) {
  CSfxChannel& chanObj = m_channels[size_t(chan)];
  m_currentChannel = chan;
  m_doUpdate = true;
  if (chanObj.x44_listenerActive) {
    for (const CSfxHandle& handle : chanObj.x48_handles) {
      handle->UpdateEmitter();
    }
  }
}

void CSfxManager::TurnOffChannel(ESfxChannels chan) {
  CSfxChannel& chanObj = m_channels[size_t(chan)];
  for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
    const CSfxHandle& handle = *it;
    if (handle->IsLooped()) {
      handle->UpdateEmitterSilent();
    } else {
      handle->Stop();
      handle->Close();
      it = chanObj.x48_handles.erase(it);
      continue;
    }
    ++it;
  }

  for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
    const CSfxHandle& handle = *it;
    if (!handle->IsLooped()) {
      handle->Release();
      handle->Close();
      it = chanObj.x48_handles.erase(it);
      continue;
    }
    ++it;
  }
}

void CSfxManager::AddListener(ESfxChannels channel, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
                              const zeus::CVector3f& heading, const zeus::CVector3f& up, float frontRadius,
                              float surroundRadius, float soundSpeed, u32 flags /* 0x1 for doppler */, float vol) {
//  if (m_listener)
//    CAudioSys::GetAmuseEngine().removeListener(m_listener.get());
//  zeus::simd_floats p(pos.mSimd);
//  zeus::simd_floats d(dir.mSimd);
//  zeus::simd_floats h(heading.mSimd);
//  zeus::simd_floats u(up.mSimd);
//  m_listener = CAudioSys::GetAmuseEngine().addListener(p.data(), d.data(), h.data(), u.data(), frontRadius,
//                                                       surroundRadius, soundSpeed, vol);
}

void CSfxManager::UpdateListener(const zeus::CVector3f& pos, const zeus::CVector3f& dir, const zeus::CVector3f& heading,
                                 const zeus::CVector3f& up, float vol) {
//  if (m_listener) {
//    zeus::simd_floats p(pos.mSimd);
//    zeus::simd_floats d(dir.mSimd);
//    zeus::simd_floats h(heading.mSimd);
//    zeus::simd_floats u(up.mSimd);
//    m_listener->setVectors(p.data(), d.data(), h.data(), u.data());
//    m_listener->setVolume(vol);
//  }
}

s16 CSfxManager::GetRank(CBaseSfxWrapper* sfx) {
  const CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];
  if (!sfx->IsInArea()) {
    return 0;
  }

  s16 rank = sfx->GetPriority() / 4;
  if (sfx->IsPlaying()) {
    ++rank;
  }

  if (sfx->IsLooped()) {
    rank -= 2;
  }

  if (sfx->Ready() && !sfx->IsPlaying()) {
    rank += 3;
  }

  if (chanObj.x44_listenerActive) {
    const ESfxAudibility aud = sfx->GetAudible(chanObj.x0_pos);
    if (aud == ESfxAudibility::Aud0) {
      return 0;
    }
    rank += int(aud) / 2;
  }

  return rank;
}

void CSfxManager::ApplyReverb() {
  const CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];
  for (const CSfxHandle& handle : chanObj.x48_handles) {
    handle->SetReverb(m_reverbAmount);
  }
}

float CSfxManager::GetReverbAmount() { return m_reverbAmount; }

void CSfxManager::PitchBend(const CSfxHandle& handle, float pitch) {
  if (!handle)
    return;
  if (!handle->IsPlaying())
    CSfxManager::Update(0.f);
//  if (handle->IsPlaying()) {
//    m_doUpdate = true;
//    handle->GetVoice()->setPitchWheel(pitch);
//  }
}

void CSfxManager::SfxVolume(const CSfxHandle& handle, float vol) {
  if (!handle)
    return;
  if (handle->IsEmitter()) {
    CSfxWrapper& wrapper = static_cast<CSfxWrapper&>(*handle);
    wrapper.SetVolume(vol);
  }
//  if (handle->IsPlaying())
//    handle->GetVoice()->setVolume(vol);
}

void CSfxManager::SfxSpan(const CSfxHandle& handle, float span) {
  if (!handle)
    return;
//  if (handle->IsPlaying())
//    handle->GetVoice()->setSurroundPan(span);
}

u16 CSfxManager::TranslateSFXID(u16 id) {
  if (mpSfxTranslationTable == nullptr)
    return 0;

  u16 index = id;
  if (index >= mpSfxTranslationTable->size())
    return 0;

  u16 ret = (*mpSfxTranslationTable)[index];
  if (ret == 0xffff)
    return 0;
  return ret;
}

bool CSfxManager::PlaySound(const CSfxManager::CSfxHandle& handle) { return false; }

void CSfxManager::StopSound(const CSfxHandle& handle) {
  if (!handle)
    return;
  m_doUpdate = true;
  handle->Stop();
  handle->Release();
  CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];
  handle->Close();
  chanObj.x48_handles.erase(handle);
}

void CSfxManager::SfxStop(const CSfxHandle& handle) { StopSound(handle); }

CSfxHandle CSfxManager::SfxStart(u16 id, float vol, float pan, bool useAcoustics, s16 prio, bool looped, s32 areaId) {
  if (m_muted || id == 0xffff)
    return {};

  m_doUpdate = true;
  CSfxHandle wrapper = std::make_shared<CSfxWrapper>(looped, prio, id, vol, pan, useAcoustics, areaId);
  CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];
  chanObj.x48_handles.insert(wrapper);
  return wrapper;
}

bool CSfxManager::IsPlaying(const CSfxHandle& handle) {
  if (!handle)
    return false;
  return handle->IsPlaying();
}

void CSfxManager::RemoveEmitter(const CSfxHandle& handle) { StopSound(handle); }

void CSfxManager::UpdateEmitter(const CSfxHandle& handle, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
                                float maxVol) {
  if (!handle || !handle->IsEmitter() || !handle->IsPlaying())
    return;
//  m_doUpdate = true;
//  CSfxEmitterWrapper& emitter = static_cast<CSfxEmitterWrapper&>(*handle);
//  emitter.GetEmitterData().x0_pos = pos;
//  emitter.GetEmitterData().xc_dir = dir;
//  emitter.GetEmitterData().x26_maxVol = maxVol;
//  amuse::Emitter& h = *emitter.GetHandle();
//  zeus::simd_floats p(pos.mSimd);
//  zeus::simd_floats d(dir.mSimd);
//  h.setVectors(p.data(), d.data());
//  h.setMaxVol(maxVol);
}

CSfxHandle CSfxManager::AddEmitter(u16 id, const zeus::CVector3f& pos, const zeus::CVector3f& dir, bool useAcoustics,
                                   bool looped, s16 prio, s32 areaId) {
  const CAudioSys::C3DEmitterParmData parmData{
      .x0_pos = pos,
      .xc_dir = dir,
      .x18_maxDist = 150.f,
      .x1c_distComp = 0.1f,
      .x20_flags = 1, // Continuous parameter update
      .x24_sfxId = id,
      .x26_maxVol = 1.f,
      .x27_minVol = 0.165f,
      .x28_important = false,
      .x29_prio = 0x7f,
  };
  return AddEmitter(parmData, useAcoustics, prio, looped, areaId);
}

CSfxHandle CSfxManager::AddEmitter(u16 id, const zeus::CVector3f& pos, const zeus::CVector3f& dir, float vol,
                                   bool useAcoustics, bool looped, s16 prio, s32 areaId) {
  const CAudioSys::C3DEmitterParmData parmData{
      .x0_pos = pos,
      .xc_dir = dir,
      .x18_maxDist = 150.f,
      .x1c_distComp = 0.1f,
      .x20_flags = 1, // Continuous parameter update
      .x24_sfxId = id,
      .x26_maxVol = std::max(vol, 0.165f),
      .x27_minVol = 0.165f,
      .x28_important = false,
      .x29_prio = 0x7f,
  };
  return AddEmitter(parmData, useAcoustics, prio, looped, areaId);
}

CSfxHandle CSfxManager::AddEmitter(const CAudioSys::C3DEmitterParmData& parmData, bool useAcoustics, s16 prio,
                                   bool looped, s32 areaId) {
  if (m_muted || parmData.x24_sfxId == 0xffff)
    return {};

  CAudioSys::C3DEmitterParmData data = parmData;
  if (looped)
    data.x20_flags |= 0x6; // Pausable/restartable when inaudible
  m_doUpdate = true;
  CSfxHandle wrapper = std::make_shared<CSfxEmitterWrapper>(looped, prio, data, useAcoustics, areaId);
  CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];
  chanObj.x48_handles.insert(wrapper);
  return wrapper;
}

void CSfxManager::StopAndRemoveAllEmitters() {
  for (auto& chanObj : m_channels) {
    for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
      const CSfxHandle& handle = *it;
      handle->Stop();
      handle->Release();
      handle->Close();
      it = chanObj.x48_handles.erase(it);
    }
  }
}

void CSfxManager::EnableAuxCallback() {
  m_reverbAmount = 0.f;
  ApplyReverb();
  if (m_activeEffect != EAuxEffect::None)
    DisableAuxCallback();

//  auto studio = CAudioSys::GetAmuseEngine().getDefaultStudio();
//  amuse::Submix& smix = studio->getAuxA();
//
//  m_activeEffect = m_nextEffect;
//  switch (m_activeEffect) {
//  case EAuxEffect::ReverbHi:
//    s_ReverbHiState = &smix.makeReverbHi(s_ReverbHiQueued);
//    break;
//  case EAuxEffect::Chorus:
//    s_ChorusState = &smix.makeChorus(s_ChorusQueued);
//    break;
//  case EAuxEffect::ReverbStd:
//    s_ReverbStdState = &smix.makeReverbStd(s_ReverbStdQueued);
//    break;
//  case EAuxEffect::Delay:
//    s_DelayState = &smix.makeDelay(s_DelayQueued);
//    break;
//  default:
//    break;
//  }

  m_auxProcessingEnabled = true;
}

//void CSfxManager::PrepareDelayCallback(const amuse::EffectDelayInfo& info) {
//  DisableAuxProcessing();
//  s_DelayQueued = info;
//  m_nextEffect = EAuxEffect::Delay;
//  if (m_reverbAmount == 0.f)
//    EnableAuxCallback();
//}
//
//void CSfxManager::PrepareReverbStdCallback(const amuse::EffectReverbStdInfo& info) {
//  DisableAuxProcessing();
//  s_ReverbStdQueued = info;
//  m_nextEffect = EAuxEffect::ReverbStd;
//  if (m_reverbAmount == 0.f)
//    EnableAuxCallback();
//}
//
//void CSfxManager::PrepareChorusCallback(const amuse::EffectChorusInfo& info) {
//  DisableAuxProcessing();
//  s_ChorusQueued = info;
//  m_nextEffect = EAuxEffect::Chorus;
//  if (m_reverbAmount == 0.f)
//    EnableAuxCallback();
//}
//
//void CSfxManager::PrepareReverbHiCallback(const amuse::EffectReverbHiInfo& info) {
//  DisableAuxProcessing();
//  s_ReverbHiQueued = info;
//  m_nextEffect = EAuxEffect::ReverbHi;
//  if (m_reverbAmount == 0.f)
//    EnableAuxCallback();
//}

void CSfxManager::DisableAuxCallback() {
//  auto studio = CAudioSys::GetAmuseEngine().getDefaultStudio();
//  studio->getAuxA().clearEffects();
//
//  switch (m_activeEffect) {
//  case EAuxEffect::ReverbHi:
//    s_ReverbHiState = nullptr;
//    break;
//  case EAuxEffect::Chorus:
//    s_ChorusState = nullptr;
//    break;
//  case EAuxEffect::ReverbStd:
//    s_ReverbStdState = nullptr;
//    break;
//  case EAuxEffect::Delay:
//    s_DelayState = nullptr;
//    break;
//  default:
//    break;
//  }
//
//  m_activeEffect = EAuxEffect::None;
}

void CSfxManager::DisableAuxProcessing() {
  m_nextEffect = EAuxEffect::None;
  m_auxProcessingEnabled = false;
}

void CSfxManager::SetActiveAreas(const rstl::reserved_vector<TAreaId, 10>& areas) {
  const CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];

  for (const CSfxHandle& hnd : chanObj.x48_handles) {
    const TAreaId sndArea = hnd->GetArea();
    if (sndArea == kInvalidAreaId) {
      hnd->SetInArea(true);
    } else {
      bool inArea = false;
      for (const TAreaId id : areas) {
        if (sndArea == id) {
          inArea = true;
          break;
        }
      }
      m_doUpdate = true;
      hnd->SetInArea(inArea);
    }
  }
}

void CSfxManager::Update(float dt) {
  CSfxChannel& chanObj = m_channels[size_t(m_currentChannel)];

  for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
    const CSfxHandle& handle = *it;
    if (!handle->IsLooped()) {
      float timeRem = handle->GetTimeRemaining();
      handle->SetTimeRemaining(timeRem - dt);
      if (timeRem < 0.f) {
        handle->Stop();
        m_doUpdate = true;
        handle->Close();
        it = chanObj.x48_handles.erase(it);
        continue;
      }
    }
    ++it;
  }

  if (m_doUpdate) {
    std::vector<CSfxHandle> rankedSfx;
    rankedSfx.reserve(chanObj.x48_handles.size());
    for (const CSfxHandle& handle : chanObj.x48_handles) {
      rankedSfx.push_back(handle);
      handle->SetRank(GetRank(handle.get()));
    }

    std::sort(rankedSfx.begin(), rankedSfx.end(),
              [](const CSfxHandle& a, const CSfxHandle& b) -> bool { return a->GetRank() < b->GetRank(); });

    for (size_t i = 48; i < rankedSfx.size(); ++i) {
      const CSfxHandle& handle = rankedSfx[i];
      if (handle->IsPlaying()) {
        handle->Stop();
        handle->Close();
        chanObj.x48_handles.erase(handle);
      }
    }

    for (const CSfxHandle& handle : rankedSfx) {
      if (handle->IsPlaying() && !handle->IsInArea()) {
        handle->Stop();
        handle->Close();
        chanObj.x48_handles.erase(handle);
      }
    }

#ifndef URDE_MSAN
    for (const CSfxHandle& handle : chanObj.x48_handles) {
      if (handle->IsPlaying())
        continue;
      if (handle->Ready() && handle->IsInArea())
        handle->Play();
    }
#endif

    m_doUpdate = false;
  }

  for (auto it = chanObj.x48_handles.begin(); it != chanObj.x48_handles.end();) {
    const CSfxHandle& handle = *it;
    if (!handle->IsPlaying() && !handle->IsLooped()) {
      handle->Stop();
      handle->Release();
      m_doUpdate = true;
      handle->Close();
      it = chanObj.x48_handles.erase(it);
      continue;
    }
    ++it;
  }

  if (m_auxProcessingEnabled && m_reverbAmount < 1.f) {
    m_reverbAmount = std::min(1.f, dt / 0.1f + m_reverbAmount);
    ApplyReverb();
  } else if (!m_auxProcessingEnabled && m_reverbAmount > 0.f) {
    m_reverbAmount = std::max(0.f, m_reverbAmount - dt / (2.f * 0.1f));
    ApplyReverb();
    if (m_reverbAmount == 0.f) {
      DisableAuxCallback();
      EnableAuxCallback();
    }
  }

  if (mpSfxTranslationTableTok.IsLoaded() && !mpSfxTranslationTable)
    mpSfxTranslationTable = mpSfxTranslationTableTok.GetObj();
}

void CSfxManager::Shutdown() {
  mpSfxTranslationTable = nullptr;
  mpSfxTranslationTableTok = TLockedToken<std::vector<u16>>{};
  StopAndRemoveAllEmitters();
  DisableAuxCallback();
}

} // namespace metaforce


================================================
FILE: Runtime/Audio/CSfxManager.hpp
================================================
#pragma once

#include <array>
#include <memory>
#include <unordered_set>
#include <vector>

#include "SFX/SFX.h"
#include "Runtime/RetroTypes.hpp"
#include "Runtime/Audio/CAudioSys.hpp"

#include <zeus/CVector3f.hpp>

namespace metaforce {

class CSfxManager {
  static std::vector<u16>* mpSfxTranslationTable;

public:
  enum class ESfxChannels { Invalid = -1, Default = 0, Game, PauseScreen };

  enum class ESfxAudibility { Aud0, Aud1, Aud2, Aud3 };

  enum class EAuxEffect { None = -1, ReverbHi = 0, Chorus, ReverbStd, Delay };

  class CBaseSfxWrapper;
  using CSfxHandle = std::shared_ptr<CBaseSfxWrapper>;

  /* Original imp, kept for reference
  class CSfxHandle
  {
      static u32 mRefCount;
      u32 x0_idx;
  public:
      CSfxHandle(u32 id)
          : x0_idx(++mRefCount << 14 | (id & 0xFFFF)) {}
  };
  */

  class CSfxChannel {
    friend class CSfxManager;
    zeus::CVector3f x0_pos;
    zeus::CVector3f xc_;
    zeus::CVector3f x18_;
    zeus::CVector3f x24_;
    /*
    float x30_ = 0.f;
    float x34_ = 0.f;
    float x38_ = 0.f;
    u32 x3c_ = 0;
    bool x40_ = false;
    */
    bool x44_listenerActive = false;
    std::unordered_set<CSfxHandle> x48_handles;
  };

  class CBaseSfxWrapper : public std::enable_shared_from_this<CBaseSfxWrapper> {
    float x4_timeRemaining = 15.f;
    s16 x8_rank = 0;
    s16 xa_prio;
    // CSfxHandle xc_handle;
    TAreaId x10_area;
    bool x14_24_isActive : 1 = true;
    bool x14_25_isPlaying : 1 = false;
    bool x14_26_looped : 1;
    bool x14_27_inArea : 1 = true;
    bool x14_28_isReleased : 1 = false;
    bool x14_29_useAcoustics : 1;

  protected:
    bool m_isEmitter : 1 = false;
    bool m_isClosed : 1 = false;

  public:
    virtual ~CBaseSfxWrapper() = default;
    virtual void SetActive(bool v) { x14_24_isActive = v; }
    virtual void SetPlaying(bool v) { x14_25_isPlaying = v; }
    virtual void SetRank(short v) { x8_rank = v; }
    virtual void SetInArea(bool v) { x14_27_inArea = v; }
    virtual bool IsInArea() const { return x14_27_inArea; }
    virtual bool IsPlaying() const { return x14_25_isPlaying; }
    virtual bool UseAcoustics() const { return x14_29_useAcoustics; }
    virtual bool IsLooped() const { return x14_26_looped; }
    virtual bool IsActive() const { return x14_24_isActive; }
    virtual s16 GetRank() const { return x8_rank; }
    virtual s16 GetPriority() const { return xa_prio; }
    virtual TAreaId GetArea() const { return x10_area; }
    virtual CSfxHandle GetSfxHandle() { return shared_from_this(); }
    virtual void Play() = 0;
    virtual void Stop() = 0;
    virtual bool Ready() = 0;
    virtual ESfxAudibility GetAudible(const zeus::CVector3f&) = 0;
    //virtual amuse::ObjToken<amuse::Voice> GetVoice() const = 0;
    virtual u16 GetSfxId() const = 0;
    virtual void UpdateEmitterSilent() = 0;
    virtual void UpdateEmitter() = 0;
    virtual void SetReverb(float rev) = 0;
    bool IsEmitter() const { return m_isEmitter; }

    void Release() {
      x14_28_isReleased = true;
      x4_timeRemaining = 15.f;
    }
    bool IsReleased() const { return x14_28_isReleased; }

    void Close() { m_isClosed = true; }
    bool IsClosed() const { return m_isClosed; }

    float GetTimeRemaining() const { return x4_timeRemaining; }
    void SetTimeRemaining(float t) { x4_timeRemaining = t; }

    CBaseSfxWrapper(bool looped, s16 prio, /*const CSfxHandle& handle,*/ bool useAcoustics, TAreaId area)
    : xa_prio(prio), /*xc_handle(handle),*/ x10_area(area), x14_26_looped(looped), x14_29_useAcoustics(useAcoustics) {}
  };

  class CSfxEmitterWrapper : public CBaseSfxWrapper {
    float x1a_reverb = 0.0f;
    CAudioSys::C3DEmitterParmData x24_parmData;
    //amuse::ObjToken<amuse::Emitter> x50_emitterHandle;
    bool x54_ready = true;
    float x55_cachedMaxVol = 0.0f;

  public:
    bool IsPlaying() const override;
    void Play() override;
    void Stop() override;
    bool Ready() override;
    ESfxAudibility GetAudible(const zeus::CVector3f&) override;
    //amuse::ObjToken<amuse::Voice> GetVoice() const override { return x50_emitterHandle->getVoice(); }
    u16 GetSfxId() const override;
    void UpdateEmitterSilent() override;
    void UpdateEmitter() override;
    void SetReverb(float rev) override;
    CAudioSys::C3DEmitterParmData& GetEmitterData() { return x24_parmData; }

    //amuse::ObjToken<amuse::Emitter> GetHandle() const { return x50_emitterHandle; }

    CSfxEmitterWrapper(bool looped, s16 prio, const CAudioSys::C3DEmitterParmData& data,
                       /*const CSfxHandle& handle,*/ bool useAcoustics, TAreaId area)
    : CBaseSfxWrapper(looped, prio, /*handle,*/ useAcoustics, area), x24_parmData(data) {
      m_isEmitter = true;
    }
  };

  class CSfxWrapper : public CBaseSfxWrapper {
    u16 x18_sfxId;
    //amuse::ObjToken<amuse::Voice> x1c_voiceHandle;
    float x20_vol;
    float x22_pan;
    bool x24_ready = true;

  public:
    bool IsPlaying() const override;
    void Play() override;
    void Stop() override;
    bool Ready() override;
    ESfxAudibility GetAudible(const zeus::CVector3f&) override { return ESfxAudibility::Aud3; }
//    amuse::ObjToken<amuse::Voice> GetVoice() const override { return x1c_voiceHandle; }
    u16 GetSfxId() const override;
    void UpdateEmitterSilent() override;
    void UpdateEmitter() override;
    void SetReverb(float rev) override;
    void SetVolume(float vol) { x20_vol = vol; }

    CSfxWrapper(bool looped, s16 prio, u16 sfxId, float vol, float pan,
                /*const CSfxHandle& handle,*/ bool useAcoustics, TAreaId area)
    : CBaseSfxWrapper(looped, prio, /*handle,*/ useAcoustics, area), x18_sfxId(sfxId), x20_vol(vol), x22_pan(pan) {
      m_isEmitter = false;
    }
  };

  static std::array<CSfxChannel, 4> m_channels;
  static ESfxChannels m_currentChannel;
  static bool m_doUpdate;
  static void* m_usedSounds;
  static bool m_muted;
  static bool m_auxProcessingEnabled;
  static float m_reverbAmount;
  static EAuxEffect m_activeEffect;
  static EAuxEffect m_nextEffect;
  //static amuse::ObjToken<amuse::Listener> m_listener;

  static u16 kMaxPriority;
  static u16 kMedPriority;
  static u16 kInternalInvalidSfxId;
  static u32 kAllAreas;

  static bool LoadTranslationTable(CSimplePool* pool, const SObjectTag* tag);
  static bool IsAuxProcessingEnabled() { return m_auxProcessingEnabled; }
  static void SetChannel(ESfxChannels);
  static void KillAll(ESfxChannels);
  static void TurnOnChannel(ESfxChannels);
  static void TurnOffChannel(ESfxChannels);
  static ESfxChannels GetCurrentChannel() { return m_currentChannel; }
  static void AddListener(ESfxChannels channel, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
                          const zeus::CVector3f& heading, const zeus::CVector3f& up, float frontRadius,
                          float surroundRadius, float soundSpeed, u32 flags /* 0x1 for doppler */, float vol);
  static void UpdateListener(const zeus::CVector3f& pos, const zeus::CVector3f& dir, const zeus::CVector3f& heading,
                             const zeus::CVector3f& up, float vol);

  static bool PlaySound(const CSfxHandle& handle);
  static void StopSound(const CSfxHandle& handle);
  static s16 GetRank(CBaseSfxWrapper* sfx);
  static void ApplyReverb();
  static float GetReverbAmount();
  static void PitchBend(const CSfxHandle& handle, float pitch);
  static void SfxVolume(const CSfxHandle& handle, float vol);
  static void SfxSpan(const CSfxHandle& handle, float span);
  static u16 TranslateSFXID(u16);
  static void SfxStop(const CSfxHandle& handle);
  static CSfxHandle SfxStart(u16 id, float vol, float pan, bool useAcoustics, s16 prio, bool looped, s32 areaId);
  static bool IsPlaying(const CSfxHandle& handle);
  static void RemoveEmitter(const CSfxHandle& handle);
  static void UpdateEmitter(const CSfxHandle& handle, const zeus::CVector3f& pos, const zeus::CVector3f& dir,
                            float maxVol);
  static CSfxHandle AddEmitter(u16 id, const zeus::CVector3f& pos, const zeus::CVector3f& dir, bool useAcoustics,
                               bool looped, s16 prio, s32 areaId);
  static CSfxHandle AddEmitter(u16 id, const zeus::CVector3f& pos, const zeus::CVector3f& dir, float vol,
                               bool useAcoustics, bool looped, s16 prio, s32 areaId);
  static CSfxHandle AddEmitter(const CAudioSys::C3DEmitterParmData& parmData, bool useAcoustics, s16 prio, bool looped,
                               s32 areaId);
  static void StopAndRemoveAllEmitters();
  static void DisableAuxCallback();
  static void EnableAuxCallback();
//  static void PrepareDelayCallback(const amuse::EffectDelayInfo& info);
//  static void PrepareReverbStdCallback(const amuse::EffectReverbStdInfo& info);
//  static void PrepareChorusCallback(const amuse::EffectChorusInfo& info);
//  static void PrepareReverbHiCallback(const amuse::EffectReverbHiInfo& info);
  static void DisableAuxProcessing();

  static void SetActiveAreas(const rstl::reserved_vector<TAreaId, 10>& areas);

  static void Update(float dt);
  static void Shutdown();
};

using CSfxHandle = CSfxManager::CSfxHandle;

} // namespace metaforce


================================================
FILE: Runtime/Audio/CStaticAudioPlayer.cpp
================================================
#include "Runtime/Audio/CStaticAudioPlayer.hpp"

#include "Runtime/CDvdFile.hpp"
#include "Runtime/CDvdRequest.hpp"

namespace metaforce {

#define RSF_BUFFER_SIZE 0x20000

//CStaticAudioPlayer::CStaticAudioPlayer(boo::IAudioVoiceEngine& engine, std::string_view path, int loopStart,
//                                       int loopEnd)
//: x0_path(path)
//, x1c_loopStartSamp(loopStart & 0xfffffffe)
//, x20_loopEndSamp(loopEnd & 0xfffffffe)
//, m_voiceCallback(*this)
//, m_voice(engine.allocateNewStereoVoice(32000, &m_voiceCallback)) {
//  // These are mixed directly into boo voice engine instead
//  // x28_dmaLeft.reset(new u8[640]);
//  // x30_dmaRight.reset(new u8[640]);
//
//  CDvdFile file(path);
//  x10_rsfRem = file.Length();
//  x14_rsfLength = x10_rsfRem;
//
//  u32 bufCount = (x10_rsfRem + RSF_BUFFER_SIZE - 1) / RSF_BUFFER_SIZE;
//  x48_buffers.reserve(bufCount);
//  x38_dvdRequests.reserve(bufCount);
//
//  for (int remBytes = x10_rsfRem; remBytes > 0; remBytes -= RSF_BUFFER_SIZE) {
//    u32 thisSz = RSF_BUFFER_SIZE;
//    if (remBytes < RSF_BUFFER_SIZE)
//      thisSz = ROUND_UP_32(remBytes);
//
//    x48_buffers.emplace_back(new u8[thisSz]);
//    x38_dvdRequests.push_back(file.AsyncRead(x48_buffers.back().get(), thisSz));
//  }
//
//  g72x_init_state(&x58_leftState);
//  g72x_init_state(&x8c_rightState);
//}

bool CStaticAudioPlayer::IsReady() {
  if (x38_dvdRequests.size())
    return x38_dvdRequests.back()->IsComplete();
  return true;
}

void CStaticAudioPlayer::DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur,
                                          int vol, g72x_state& state, std::optional<g72x_state>& loopState) const {
  for (u32 remBytes = numSamples / 2; remBytes;) {
    u32 curBuf = cur / RSF_BUFFER_SIZE;
    u32 thisBytes = (curBuf + 1) * RSF_BUFFER_SIZE - cur;
    thisBytes = std::min(thisBytes, remBytes);
    u32 remTillLoop = loopEndCur - cur;
    remTillLoop = std::min(remTillLoop, thisBytes);

    const std::unique_ptr<u8[]>& buf = x48_buffers[curBuf];
    const u8* byte = &buf[cur - curBuf * RSF_BUFFER_SIZE];

    for (u32 i = 0; i < remTillLoop; ++i, ++byte) {
      if (!loopState && cur + i == loopStartCur)
        loopState.emplace(state);

      *bufOut = SampClamp(((g721_decoder(*byte & 0xf, &state) * vol) >> 15));
      bufOut += 2;

      *bufOut = SampClamp(((g721_decoder(*byte >> 4 & 0xf, &state) * vol) >> 15));
      bufOut += 2;
    }

    cur += remTillLoop;
    remBytes -= remTillLoop;
    if (cur == loopEndCur) {
      cur = loopStartCur;
      if (loopState)
        state = *loopState;
    }
  }
}

void CStaticAudioPlayer::Decode(s16* bufOut, u32 numSamples) {
  DecodeMonoAndMix(bufOut, numSamples, x18_curSamp / 2, x20_loopEndSamp / 2, x1c_loopStartSamp / 2, xc0_volume,
                   x58_leftState, m_leftStateLoop);

  u32 halfway = x14_rsfLength / 2;
  DecodeMonoAndMix(bufOut + 1, numSamples, x18_curSamp / 2 + halfway, x20_loopEndSamp / 2 + halfway,
                   x1c_loopStartSamp / 2 + halfway, xc0_volume, x8c_rightState, m_rightStateLoop);

  for (u32 remSamples = numSamples; remSamples;) {
    u32 remTillLoop = x20_loopEndSamp - x18_curSamp;
    remTillLoop = std::min(remTillLoop, remSamples);

    x18_curSamp += remTillLoop;
    remSamples -= remTillLoop;

    if (x18_curSamp == x20_loopEndSamp)
      x18_curSamp = x1c_loopStartSamp;
  }
}

} // namespace metaforce


================================================
FILE: Runtime/Audio/CStaticAudioPlayer.hpp
================================================
#pragma once

#include <cstring>
#include <memory>
#include <optional>
#include <vector>

#include "Runtime/RetroTypes.hpp"
#include "Runtime/Audio/CAudioSys.hpp"

#include "g721.h"

//#include <boo/audiodev/IAudioVoice.hpp>
//#include <boo/audiodev/IAudioVoiceEngine.hpp>

namespace metaforce {
class IDvdRequest;

class CStaticAudioPlayer {
  std::string x0_path;
  u32 x10_rsfRem = -1;
  u32 x14_rsfLength;
  u32 x18_curSamp = 0;
  u32 x1c_loopStartSamp;
  u32 x20_loopEndSamp;
  // u32 x24_ = 0;
  // std::unique_ptr<u8[]> x28_dmaLeft;
  // std::unique_ptr<u8[]> x30_dmaRight;
  std::vector<std::shared_ptr<IDvdRequest>> x38_dvdRequests;
  std::vector<std::unique_ptr<u8[]>> x48_buffers;
  g72x_state x58_leftState;
  g72x_state x8c_rightState;
  std::optional<g72x_state> m_leftStateLoop;
  std::optional<g72x_state> m_rightStateLoop;
  u32 xc0_volume = 32768; // Out of 32768

  static int16_t SampClamp(int32_t val) {
    if (val < -32768)
      val = -32768;
    else if (val > 32767)
      val = 32767;
    return val;
  }
/*
  struct AudioVoiceCallback  {
    CStaticAudioPlayer& m_parent;
    void preSupplyAudio(boo::IAudioVoice&, double) override {}
    size_t supplyAudio(boo::IAudioVoice& voice, size_t frames, int16_t* data) override {
      if (m_parent.IsReady()) {
        m_parent.x38_dvdRequests.clear();
        m_parent.Decode(data, frames);
      } else
        memset(data, 0, 4 * frames);
      return frames;
    }
    explicit AudioVoiceCallback(CStaticAudioPlayer& p) : m_parent(p) {}
  } m_voiceCallback;
  boo::ObjToken<boo::IAudioVoice> m_voice;
*/
public:
//  CStaticAudioPlayer(boo::IAudioVoiceEngine& engine, std::string_view path, int loopStart, int loopEnd);
//  CStaticAudioPlayer(std::string_view path, int loopStart, int loopEnd)
//  : CStaticAudioPlayer(*CAudioSys::GetVoiceEngine(), path, loopStart, loopEnd) {}

  bool IsReady();
  void DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur, int vol,
                        g72x_state& state, std::optional<g72x_state>& loopState) const;
  void Decode(s16* bufOut, u32 numSamples);
  void SetVolume(float vol) { xc0_volume = zeus::clamp(0.f, vol, 1.f) * 32768.f; }
//
//  void StartMixing() { m_voice->start(); }
//  void StopMixing() { m_voice->stop(); }
};

} // namespace metaforce


================================================
FILE: Runtime/Audio/CStreamAudioManager.cpp
================================================
#include "Runtime/Audio/CStreamAudioManager.hpp"

#include "Runtime/Audio/CAudioSys.hpp"
#include "Runtime/CDvdFile.hpp"
#include "Runtime/CDvdRequest.hpp"
#include "Runtime/CStringExtras.hpp"

#include <algorithm>
#include <array>
#include <cstdlib>
#include <cstring>
#include <memory>

//#include <amuse/DSPCodec.hpp>

namespace metaforce {
class CDSPStreamManager;

static u32 s_HandleCounter = 0;
static u32 s_HandleCounter2 = 0;

/* Standard DSPADPCM header */
struct dspadpcm_header {
  u32 x0_num_samples;
  u32 x4_num_nibbles;
  u32 x8_sample_rate;
  u16 xc_loop_flag;
  u16 xe_format; /* 0 for ADPCM */
  u32 x10_loop_start_nibble;
  u32 x14_loop_end_nibble;
  u32 x18_ca;
  s16 x1c_coef[8][2];
  s16 x3c_gain;
  s16 x3e_ps;
  s16 x40_hist1;
  s16 x42_hist2;
  s16 x44_loop_ps;
  s16 x46_loop_hist1;
  s16 x48_loop_hist2;
  std::array<u16, 11> x4a_pad;
};

struct SDSPStreamInfo {
  const char* x0_fileName;
  u32 x4_sampleRate;
  u32 x8_headerSize = sizeof(dspadpcm_header);
  u32 xc_adpcmBytes;
  bool x10_loopFlag;
  u32 x14_loopStartByte;
  u32 x18_loopEndByte;
  s16 x1c_coef[8][2];

  SDSPStreamInfo() = default;
  explicit SDSPStreamInfo(const CDSPStreamManager& stream);
};

struct SDSPStream  {
  bool x0_active;
  bool x1_oneshot;
  s32 x4_ownerId;
  SDSPStream* x8_stereoLeft;
  SDSPStream* xc_companionRight;
  SDSPStreamInfo x10_info;
  float x4c_vol;
  float m_leftgain, m_rightgain;
  // DVDFileInfo x50_dvdHandle1;
  // DVDFileInfo x8c_dvdHandle2;
  // u32 xc8_streamId = -1; // MusyX stream handle
  u32 xcc_fileCur = 0;
  std::unique_ptr<u8[]> xd4_ringBuffer;
  u32 xd8_ringBytes = 0x11DC0;   // 73152 4sec in ADPCM bytes
  u32 xdc_ringSamples = 0x1f410; // 128016 4sec in samples
  s8 xe0_curBuffer = -1;
  bool xe8_silent = true;
  u8 xec_readState = 0; // 0: NoRead 1: Read 2: ReadWrap

  std::optional<CDvdFile> m_file;
  std::array<std::shared_ptr<IDvdRequest>, 2> m_readReqs;

  void ReadBuffer(int buf) {
    u32 halfSize = xd8_ringBytes / 2;
    u8* data = xd4_ringBuffer.get() + (buf ? halfSize : 0);

    if (x10_info.x10_loopFlag) {
      u32 remFileBytes = x10_info.x18_loopEndByte - xcc_fileCur;

      if (remFileBytes < halfSize) {
        // printf("Buffering %d from %d into %d\n", remFileBytes, xcc_fileCur + x10_info.x8_headerSize, buf);
        m_file->AsyncSeekRead(data, remFileBytes, ESeekOrigin::Begin, xcc_fileCur + x10_info.x8_headerSize);
        xcc_fileCur = x10_info.x14_loopStartByte;
        u32 remBytes = halfSize - remFileBytes;
        // printf("Loop Buffering %d from %d into %d\n", remBytes, xcc_fileCur + x10_info.x8_headerSize, buf);
        m_readReqs[buf] = m_file->AsyncSeekRead(data + remFileBytes, remBytes, ESeekOrigin::Begin,
                                                xcc_fileCur + x10_info.x8_headerSize);
        xcc_fileCur += remBytes;
      } else {
        // printf("Buffering %d from %d into %d\n", halfSize, xcc_fileCur + x10_info.x8_headerSize, buf);
        m_readReqs[buf] =
            m_file->AsyncSeekRead(data, halfSize, ESeekOrigin::Begin, xcc_fileCur + x10_info.x8_headerSize);
        xcc_fileCur += halfSize;
      }
    } else {
      if (xcc_fileCur == x10_info.xc_adpcmBytes) {
        memset(data, 0, halfSize);
        return;
      }

      u32 remFileBytes = x10_info.xc_adpcmBytes - xcc_fileCur;

      if (remFileBytes < halfSize) {
        // printf("Buffering %d from %d into %d\n", remFileBytes, xcc_fileCur + x10_info.x8_headerSize, buf);
        m_readReqs[buf] =
            m_file->AsyncSeekRead(data, remFileBytes, ESeekOrigin::Begin, xcc_fileCur + x10_info.x8_headerSize);
        memset(data + remFileBytes, 0, halfSize - remFileBytes);
        xcc_fileCur = x10_info.xc_adpcmBytes;
      } else {
        // printf("Buffering %d from %d into %d\n", halfSize, xcc_fileCur + x10_info.x8_headerSize, buf);
        m_readReqs[buf] =
            m_file->AsyncSeekRead(data, halfSize, ESeekOrigin::Begin, xcc_fileCur + x10_info.x8_headerSize);
        xcc_fileCur += halfSize;
      }
    }
  }

  bool BufferStream() {
    if (xec_readState == 0) {
      ReadBuffer(0);
      ReadBuffer(1);
      xec_readState = 1;
      return false;
    } else if (xec_readState == 1) {
      if (m_readReqs[0]->IsComplete()) {
        xe0_curBuffer = 0;
        xec_readState = 2;
        return true;
      } else {
        return false;
      }
    } else if (xec_readState == 2) {
      if (xe0_curBuffer == 1 && m_readReqs[0]->IsComplete()) {
        xe0_curBuffer = 0;
        ReadBuffer(1);
        return true;
      } else if (xe0_curBuffer == 0 && m_readReqs[1]->IsComplete()) {
        xe0_curBuffer = 1;
        ReadBuffer(0);
        return true;
      }
    }
    return false;
  }

  unsigned m_curSample = 0;
  unsigned m_totalSamples = 0;
  s16 m_prev1 = 0;
  s16 m_prev2 = 0;

//  void preSupplyAudio(boo::IAudioVoice&, double) override {}

//  unsigned decompressChunk(unsigned readToSample, int16_t*& data) {
//    unsigned startSamp = m_curSample;
//
//    auto sampDiv = std::div(int(m_curSample), int(14));
//    if (sampDiv.rem) {
//      unsigned samps = DSPDecompressFrameRanged(data, xd4_ringBuffer.get() + sampDiv.quot * 8, x10_info.x1c_coef,
//                                                &m_prev1, &m_prev2, unsigned(sampDiv.rem), readToSample - m_curSample);
//      m_curSample += samps;
//      data += samps;
//      ++sampDiv.quot;
//    }
//
//    while (m_curSample < readToSample) {
//      unsigned samps = DSPDecompressFrame(data, xd4_ringBuffer.get() + sampDiv.quot * 8, x10_info.x1c_coef, &m_prev1,
//                                          &m_prev2, readToSample - m_curSample);
//      m_curSample += samps;
//      data += samps;
//      ++sampDiv.quot;
//    }
//
//    return m_curSample - startSamp;
//  }

//  size_t supplyAudio(boo::IAudioVoice&, size_t frames, int16_t* data) override {
//    if (!x0_active) {
//      memset(data, 0, frames * 2);
//      return frames;
//    }
//
//    if (xe8_silent) {
//      StopStream();
//      memset(data, 0, frames * 2);
//      return frames;
//    }
//
//    unsigned halfRingSamples = xdc_ringSamples / 2;
//
//    size_t remFrames = frames;
//    while (remFrames) {
//      if (xec_readState != 2 || (xe0_curBuffer == 0 && m_curSample >= halfRingSamples)) {
//        if (!BufferStream()) {
//          memset(data, 0, remFrames * 2);
//          return frames;
//        }
//      }
//
//      unsigned readToSample =
//          std::min(m_curSample + unsigned(remFrames), (m_curSample / halfRingSamples + 1) * halfRingSamples);
//
//      if (!x10_info.x10_loopFlag) {
//        m_totalSamples += remFrames;
//        size_t fileSamples = x10_info.xc_adpcmBytes * 14 / 8;
//        if (m_totalSamples >= fileSamples) {
//          size_t leftover = m_totalSamples - fileSamples;
//          readToSample -= leftover;
//          remFrames -= leftover;
//          memset(data + remFrames, 0, leftover * 2);
//          StopStream();
//        }
//      }
//
//      unsigned leftoverSamples = 0;
//      if (readToSample > xdc_ringSamples) {
//        leftoverSamples = readToSample - xdc_ringSamples;
//        readToSample = xdc_ringSamples;
//      }
//
//      remFrames -= decompressChunk(readToSample, data);
//
//      if (leftoverSamples) {
//        BufferStream();
//        m_curSample = 0;
//        remFrames -= decompressChunk(leftoverSamples, data);
//      }
//    }
//
//    return frames;
//  }
//  boo::ObjToken<boo::IAudioVoice> m_booVoice;

  void DoAllocateStream() {
    xd4_ringBuffer.reset(new u8[0x11DC0]);
    //m_booVoice = CAudioSys::GetVoiceEngine()->allocateNewMonoVoice(32000.0, this);
  }

  static void Initialize() {
    for (size_t i = 0; i < g_Streams.size(); ++i) {
      SDSPStream& stream = g_Streams[i];
      stream.x0_active = false;
      stream.xd4_ringBuffer.reset();
      stream.xd8_ringBytes = 0x11DC0;
      stream.xdc_ringSamples = 0x1f410;
      if (i < 2) {
        stream.x1_oneshot = false;
        stream.DoAllocateStream();
      } else {
        stream.x1_oneshot = true;
      }
    }
  }

  static void FreeAllStreams() {
//    for (auto& stream : g_Streams) {
//      stream.m_booVoice.reset();
//      stream.x0_active = false;
//      for (auto& request : stream.m_readReqs) {
//        if (request) {
//          request->PostCancelRequest();
//          request.reset();
//        }
//      }
//      stream.xd4_ringBuffer.reset();
//      stream.m_file = std::nullopt;
//    }
  }

  static s32 PickFreeStream(SDSPStream*& streamOut, bool oneshot) {
    for (auto& stream : g_Streams) {
      if (stream.x0_active || stream.x1_oneshot != oneshot) {
        continue;
      }
      stream.x0_active = true;
      stream.x4_ownerId = ++s_HandleCounter2;
      if (stream.x4_ownerId == -1) {
        stream.x4_ownerId = ++s_HandleCounter2;
      }
      stream.x8_stereoLeft = nullptr;
      stream.xc_companionRight = nullptr;
      streamOut = &stream;
      return stream.x4_ownerId;
    }
    return -1;
  }

  static s32 FindStreamIdx(s32 id) {
    for (size_t i = 0; i < g_Streams.size(); ++i) {
      const SDSPStream& stream = g_Streams[i];
      if (stream.x4_ownerId == id) {
        return s32(i);
      }
    }
    return -1;
  }

  void UpdateStreamVolume(float vol) {
//    x4c_vol = vol;
//    if (!x0_active || xe8_silent) {
//      return;
//    }
//    std::array<float, 8> coefs{};
//    coefs[size_t(boo::AudioChannel::FrontLeft)] = m_leftgain * vol;
//    coefs[size_t(boo::AudioChannel::FrontRight)] = m_rightgain * vol;
//    m_booVoice->setMonoChannelLevels(nullptr, coefs.data(), true);
  }

  static void UpdateVolume(s32 id, float vol) {
//    s32 idx = FindStreamIdx(id);
//    if (idx == -1)
//      return;
//
//    SDSPStream& stream = g_Streams[idx];
//    stream.UpdateStreamVolume(vol);
//    if (SDSPStream* left = stream.x8_stereoLeft)
//      left->UpdateStreamVolume(vol);
//    if (SDSPStream* right = stream.xc_companionRight)
//      right->UpdateStreamVolume(vol);
  }

  void SilenceStream() {
    if (!x0_active || xe8_silent) {
      return;
    }
    constexpr std::array<float, 8> coefs{};
    //m_booVoice->setMonoChannelLevels(nullptr, coefs.data(), true);
    xe8_silent = true;
    x0_active = false;
  }

  static void Silence(s32 id) {
    s32 idx = FindStreamIdx(id);
    if (idx == -1)
      return;

    SDSPStream& stream = g_Streams[idx];
    stream.SilenceStream();
    if (SDSPStream* left = stream.x8_stereoLeft)
      left->SilenceStream();
    if (SDSPStream* right = stream.xc_companionRight)
      right->SilenceStream();
  }

  void StopStream() {
    x0_active = false;
    //m_booVoice->stop();
    m_file = std::nullopt;
  }

  static bool IsStreamActive(s32 id) {
    s32 idx = FindStreamIdx(id);
    if (idx == -1)
      return false;

    SDSPStream& stream = g_Streams[idx];
    return stream.x0_active;
  }

  static bool IsStreamAvailable(s32 id) {
    s32 idx = FindStreamIdx(id);
    if (idx == -1)
      return false;

    SDSPStream& stream = g_Streams[idx];
    return !stream.x0_active;
  }

  static s32 AllocateMono(const SDSPStreamInfo& info, float vol, bool oneshot) {
    SDSPStream* stream;
    s32 id = PickFreeStream(stream, oneshot);
    if (id == -1)
      return -1;

    /* -3dB pan law for mono */
    stream->AllocateStream(info, vol, 0.707f, 0.707f);
    return id;
  }

  static s32 AllocateStereo(const SDSPStreamInfo& linfo, const SDSPStreamInfo& rinfo, float vol, bool oneshot) {
    SDSPStream* lstream;
    s32 lid = PickFreeStream(lstream, oneshot);
    if (lid == -1)
      return -1;

    SDSPStream* rstream;
    if (PickFreeStream(rstream, oneshot) == -1)
      return -1;

    rstream->x8_stereoLeft = lstream;
    lstream->xc_companionRight = rstream;

    lstream->AllocateStream(linfo, vol, 1.f, 0.f);
    rstream->AllocateStream(rinfo, vol, 0.f, 1.f);
    return lid;
  }

  void AllocateStream(const SDSPStreamInfo& info, float vol, float left, float right) {
    x10_info = info;
    m_file.emplace(x10_info.x0_fileName);
    if (!xd4_ringBuffer) {
      DoAllocateStream();
    }
    for (auto& request : m_readReqs) {
      if (request) {
        request->PostCancelRequest();
        request.reset();
      }
    }
    x4c_vol = vol;
    m_leftgain = left;
    m_rightgain = right;
    xe8_silent = false;
    xec_readState = 0;
    xe0_curBuffer = -1;
    xd8_ringBytes = 0x11DC0;
    xdc_ringSamples = 0x1f410;
    xcc_fileCur = 0;
    m_curSample = 0;
    m_totalSamples = 0;
    m_prev1 = 0;
    m_prev2 = 0;
    memset(xd4_ringBuffer.get(), 0, 0x11DC0);
    //m_booVoice->resetSampleRate(info.x4_sampleRate);
    //m_booVoice->start();
    UpdateStreamVolume(vol);
  }

  static std::array<SDSPStream, 4> g_Streams;
};

std::array<SDSPStream, 4> SDSPStream::g_Streams{};

class CDSPStreamManager {
  friend struct SDSPStreamInfo;

public:
  enum class EState { Looping, Oneshot, Preparing };

private:
  dspadpcm_header x0_header;
  std::string x60_fileName; // arg1
  bool x70_24_unclaimed : 1 = true;
  bool x70_25_headerReadCancelled : 1 = false;
  u8 x70_26_headerReadState : 2 = 0; // 0: not read 1: reading 2: read
  s8 x71_companionRight = -1;
  s8 x72_companionLeft = -1;
  float x73_volume = 0.f;
  bool x74_oneshot = false;
  s32 x78_handleId = -1; // arg2
  s32 x7c_streamId = -1;
  std::shared_ptr<IDvdRequest> m_dvdReq;
  // DVDFileInfo x80_dvdHandle;
  static std::array<CDSPStreamManager, 4> g_Streams;

public:
  CDSPStreamManager() = default;

  CDSPStreamManager(std::string_view fileName, s32 handle, float volume, bool oneshot)
  : x60_fileName(fileName)
  , x70_24_unclaimed(!CDvdFile::FileExists(fileName))
  , x73_volume(volume)
  , x74_oneshot(oneshot)
  , x78_handleId(handle) {}

  static s32 FindUnclaimedStreamIdx() {
    for (size_t i = 0; i < g_Streams.size(); ++i) {
      const CDSPStreamManager& stream = g_Streams[i];
      if (stream.x70_24_unclaimed) {
        return s32(i);
      }
    }
    return -1;
  }

  static bool FindUnclaimedStereoPair(s32& left, s32& right) {
    const s32 idx = FindUnclaimedStreamIdx();

    for (size_t i = 0; i < g_Streams.size(); ++i) {
      CDSPStreamManager& stream = g_Streams[i];
      if (stream.x70_24_unclaimed && idx != s32(i)) {
        left = idx;
        right = s32(i);
        return true;
      }
    }

    return false;
  }

  static s32 FindClaimedStreamIdx(s32 handle) {
    for (size_t i = 0; i < g_Streams.size(); ++i) {
      const CDSPStreamManager& stream = g_Streams[i];
      if (!stream.x70_24_unclaimed && stream.x78_handleId == handle) {
        return i;
      }
    }
    return -1;
  }

  static s32 GetFreeHandleId() {
    s32 handle;
    bool good;
    do {
      good = true;
      handle = ++s_HandleCounter;
      if (handle == -1) {
        good = false;
        continue;
      }

      for (auto& stream : g_Streams) {
        if (!stream.x70_24_unclaimed && stream.x78_handleId == handle) {
          good = false;
          break;
        }
      }

    } while (!good);

    return handle;
  }

  static EState GetStreamState(s32 handle) {
    s32 idx = FindClaimedStreamIdx(handle);
    if (idx == -1)
      return EState::Oneshot;

    CDSPStreamManager& stream = g_Streams[idx];
    switch (stream.x70_26_headerReadState) {
    case 0:
      return EState::Oneshot;
    case 2:
      return EState(!stream.x0_header.xc_loop_flag);
    default:
      return EState::Preparing;
    }
  }

  static bool CanStop(s32 handle) {
    s32 idx = FindClaimedStreamIdx(handle);
    if (idx == -1)
      return true;

    CDSPStreamManager& stream = g_Streams[idx];
    if (stream.x70_26_headerReadState == 1)
      return false;

    if (stream.x7c_streamId == -1)
      return true;

    return !SDSPStream::IsStreamActive(stream.x7c_streamId);
  }

  static bool IsStreamAvailable(s32 handle) {
    s32 idx = FindClaimedStreamIdx(handle);
    if (idx == -1)
      return false;

    CDSPStreamManager& stream = g_Streams[idx];
    if (stream.x70_26_headerReadState == 1)
      return false;

    if (stream.x7c_streamId == -1)
      return false;

    return SDSPStream::IsStreamAvailable(stream.x7c_streamId);
  }

  static void AllocateStream(s32 idx) {
    CDSPStreamManager& stream = g_Streams[idx];
    SDSPStreamInfo info(stream);

    if (stream.x71_companionRight == -1) {
      /* Mono */
      if (!stream.x70_25_headerReadCancelled)
        stream.x7c_streamId = SDSPStream::AllocateMono(info, stream.x73_volume, stream.x74_oneshot);
      if (stream.x7c_streamId == -1)
        stream = CDSPStreamManager();
    } else {
      /* Stereo */
      CDSPStreamManager& rstream = g_Streams[stream.x71_companionRight];
      SDSPStreamInfo rinfo(rstream);

      if (!stream.x70_25_headerReadCancelled)
        stream.x7c_streamId = SDSPStream::AllocateStereo(info, rinfo, stream.x73_volume, stream.x74_oneshot);
      if (stream.x7c_streamId == -1) {
        stream = CDSPStreamManager();
        rstream = CDSPStreamManager();
      }
    }
  }

  void HeaderReadComplete() {
    s32 selfIdx = -1;
    for (size_t i = 0; i < g_Streams.size(); ++i) {
      if (this == &g_Streams[i]) {
        selfIdx = s32(i);
        break;
      }
    }

    if (x70_24_unclaimed || selfIdx == -1) {
      *this = CDSPStreamManager();
      return;
    }

    x70_26_headerReadState = 2;

    s32 companion = -1;
    if (x72_companionLeft != -1)
      companion = x72_companionLeft;
    else if (x71_companionRight != -1)
      companion = x71_companionRight;

    if (companion != -1) {
      /* Stereo */
      CDSPStreamManager& companionStream = g_Streams[companion];
      if (companionStream.x70_24_unclaimed || companionStream.x70_26_headerReadState == 0 ||
          (companionStream.x71_companionRight != selfIdx && companionStream.x72_companionLeft != selfIdx)) {
        /* No consistent companion available */
        *this = CDSPStreamManager();
        return;
      }

      /* Companion is pending; its completion will continue */
      if (companionStream.x70_26_headerReadState == 1)
        return;

      /* Use whichever stream is the left channel */
      if (companionStream.x71_companionRight != -1)
        AllocateStream(companion);
      else
        AllocateStream(selfIdx);
    } else {
      /* Mono */
      AllocateStream(selfIdx);
    }
  }

  static void PollHeaderReadCompletions() {
    for (auto& stream : g_Streams) {
      if (stream.m_dvdReq && stream.m_dvdReq->IsComplete()) {
        stream.m_dvdReq.reset();
        stream.HeaderReadComplete();
      }
    }
  }

  static bool StartMonoHeaderRead(CDSPStreamManager& stream) {
    if (stream.x70_26_headerReadState != 0 || stream.x70_24_unclaimed)
      return false;

    CDvdFile file(stream.x60_fileName);
    if (!file)
      return false;

    stream.x70_26_headerReadState = 1;
    stream.m_dvdReq = file.AsyncRead(&stream.x0_header, sizeof(dspadpcm_header));
    return true;
  }

  static bool StartStereoHeaderRead(CDSPStreamManager& lstream, CDSPStreamManager& rstream) {
    if (lstream.x70_26_headerReadState != 0 || lstream.x70_24_unclaimed || rstream.x70_26_headerReadState != 0 ||
        rstream.x70_24_unclaimed)
      return false;

    CDvdFile lfile(lstream.x60_fileName);
    if (!lfile)
      return false;

    CDvdFile rfile(rstream.x60_fileName);
    if (!rfile)
      return false;

    lstream.x70_26_headerReadState = 1;
    rstream.x70_26_headerReadState = 1;

    lstream.m_dvdReq = lfile.AsyncRead(&lstream.x0_header, sizeof(dspadpcm_header));
    rstream.m_dvdReq = rfile.AsyncRead(&rstream.x0_header, sizeof(dspadpcm_header));
    return true;
  }

  void WaitForReadCompletion() {
    if (std::shared_ptr<IDvdRequest> req = m_dvdReq)
      req->WaitUntilComplete();
    m_dvdReq.reset();
  }

  static s32 StartStreaming(std::string_view fileName, float volume, bool oneshot) {
    auto pipePos = fileName.find('|');
    if (pipePos == std::string::npos) {
      /* Mono stream */
      s32 idx = FindUnclaimedStreamIdx();
      if (idx == -1)
        return -1;

      s32 handle = GetFreeHandleId();
      CDSPStreamManager tmpStream(fileName, handle, volume, oneshot);
      if (tmpStream.x70_24_unclaimed)
        return -1;

      CDSPStreamManager& stream = g_Streams[idx];
      stream = tmpStream;

      if (!StartMonoHeaderRead(stream)) {
        stream.x70_25_headerReadCancelled = true;
        stream.WaitForReadCompletion();
        stream = CDSPStreamManager();
        return -1;
      }

      return handle;
    } else {
      /* Stereo stream */
      s32 leftIdx = 0;
      s32 rightIdx = 0;
      if (!FindUnclaimedStereoPair(leftIdx, rightIdx))
        return -1;

      std::string leftFile(fileName.begin(), fileName.begin() + pipePos);
      std::string rightFile(fileName.begin() + pipePos + 1, fileName.end());

      s32 leftHandle = GetFreeHandleId();
      s32 rightHandle = GetFreeHandleId();
      CDSPStreamManager tmpLeftStream(leftFile, leftHandle, volume, oneshot);
      CDSPStreamManager tmpRightStream(rightFile, rightHandle, volume, oneshot);
      if (tmpLeftStream.x70_24_unclaimed || tmpRightStream.x70_24_unclaimed)
        return -1;

      tmpLeftStream.x71_companionRight = s8(rightIdx);
      tmpRightStream.x72_companionLeft = s8(leftIdx);

      CDSPStreamManager& leftStream = g_Streams[leftIdx];
      CDSPStreamManager& rightStream = g_Streams[rightIdx];
      leftStream = tmpLeftStream;
      rightStream = tmpRightStream;

      if (!StartStereoHeaderRead(leftStream, rightStream)) {
        leftStream.x70_25_headerReadCancelled = true;
        rightStream.x70_25_headerReadCancelled = true;
        leftStream.WaitForReadCompletion();
        leftStream.WaitForReadCompletion();
        leftStream = CDSPStreamManager();
        rightStream = CDSPStreamManager();
        return -1;
      }

      return leftHandle;
    }
  }

  static void StopStreaming(s32 handle) {
    s32 idx = FindClaimedStreamIdx(handle);
    if (idx == -1)
      return;

    CDSPStreamManager& stream = g_Streams[idx];
    if (stream.x70_24_unclaimed)
      return;

    if (stream.x70_26_headerReadState == 1) {
      stream.x70_25_headerReadCancelled = true;
      return;
    }

    if (stream.x71_companionRight != -1)
      g_Streams[stream.x71_companionRight] = CDSPStreamManager();

    SDSPStream::Silence(stream.x7c_streamId);

    stream = CDSPStreamManager();
  }

  static void UpdateVolume(s32 handle, float volume) {
    s32 idx = FindClaimedStreamIdx(handle);
    if (idx == -1)
      return;

    CDSPStreamManager& stream = g_Streams[idx];
    stream.x73_volume = volume;
    if (stream.x7c_streamId == -1)
      return;

    SDSPStream::UpdateVolume(stream.x7c_streamId, volume);
  }

  static void Initialize() {
    SDSPStream::Initialize();
    for (auto& stream : g_Streams) {
      stream = CDSPStreamManager();
    }
  }

  static void Shutdown() {
    SDSPStream::FreeAllStreams();
    for (auto& stream : g_Streams) {
      stream = CDSPStreamManager();
    }
  }
};

std::array<CDSPStreamManager, 4> CDSPStreamManager::g_Streams{};

SDSPStreamInfo::SDSPStreamInfo(const CDSPStreamManager& stream) {
  x0_fileName = stream.x60_fileName.c_str();
  x4_sampleRate = SBig(stream.x0_header.x8_sample_rate);
  xc_adpcmBytes = (SBig(stream.x0_header.x4_num_nibbles) / 2) & 0x7FFFFFE0;

  if (stream.x0_header.xc_loop_flag) {
    u32 loopStartNibble = SBig(stream.x0_header.x10_loop_start_nibble);
    u32 loopEndNibble = SBig(stream.x0_header.x14_loop_end_nibble);
    x10_loopFlag = true;
    x14_loopStartByte = (loopStartNibble / 2) & 0x7FFFFFE0;
    x18_loopEndByte = std::min((loopEndNibble / 2) & 0x7FFFFFE0, xc_adpcmBytes);
  } else {
    x10_loopFlag = false;
    x14_loopStartByte = 0;
    x18_loopEndByte = 0;
  }

  for (int i = 0; i < 8; ++i) {
    x1c_coef[i][0] = SBig(stream.x0_header.x1c_coef[i][0]);
    x1c_coef[i][1] = SBig(stream.x0_header.x1c_coef[i][1]);
  }
}

enum class EPlayerState { Stopped, FadeIn, Playing, FadeOut, FadeOutNoStop };

struct SDSPPlayer {
  std::string x0_fileName;
  EPlayerState x10_playState = EPlayerState::Stopped;
  float x14_volume = 0.f;
  float x18_fadeIn = 0.f;
  float x1c_fadeOut = 0.f;
  s32 x20_internalHandle = -1;
  float x24_fadeFactor = 0.f;
  bool x28_music = true;

  SDSPPlayer() = default;
  SDSPPlayer(EPlayerState playing, std::string_view fileName, float volume, float fadeIn, float fadeOut, s32 handle,
             bool music)
  : x0_fileName(fileName)
  , x10_playState(playing)
  , x14_volume(volume)
  , x18_fadeIn(fadeIn)
  , x1c_fadeOut(fadeOut)
  , x20_internalHandle(handle)
  , x28_music(music) {}
};

using PlayerArray = std::array<SDSPPlayer, 2>;
static PlayerArray s_Players;       // looping, oneshot
static PlayerArray s_QueuedPlayers; // looping, oneshot

float CStreamAudioManager::GetTargetDSPVolume(float fileVol, bool music) {
  if (music)
    return g_MusicUnmute ? (g_MusicVolume * fileVol / 127.f) : 0.f;
  else
    return g_SfxUnmute ? (g_SfxVolume * fileVol / 127.f) : 0.f;
}

void CStreamAudioManager::Start(bool oneshot, std::string_view fileName, float volume, bool music, float fadeIn,
                                float fadeOut) {
  SDSPPlayer& p = s_Players[oneshot];
  SDSPPlayer& qp = s_QueuedPlayers[oneshot];

  if (p.x10_playState != EPlayerState::Stopped && !CStringExtras::CompareCaseInsensitive(fileName, p.x0_fileName)) {
    /* Enque new stream */
    qp = SDSPPlayer(EPlayerState::FadeIn, fileName, volume, fadeIn, fadeOut, -1, music);
    Stop(oneshot, p.x0_fileName);
  } else if (p.x10_playState != EPlayerState::Stopped) {
    /* Fade existing stream back in */
    p.x18_fadeIn = fadeIn;
    p.x1c_fadeOut = fadeOut;
    p.x14_volume = volume;
    if (p.x18_fadeIn <= FLT_EPSILON) {
      CDSPStreamManager::UpdateVolume(p.x20_internalHandle, GetTargetDSPVolume(p.x14_volume, p.x28_music));
      p.x24_fadeFactor = 1.f;
      p.x10_playState = EPlayerState::Playing;
    } else {
      p.x10_playState = EPlayerState::FadeIn;
    }
  } else {
    /* Start new stream */
    EPlayerState state;
    float vol;
    if (fadeIn > 0.f) {
      state = EPlayerState::FadeIn;
      vol = 0.f;
    } else {
      state = EPlayerState::Playing;
      vol = volume;
    }

    s32 handle = CDSPStreamManager::StartStreaming(fileName, GetTargetDSPVolume(vol, music), oneshot);
    if (handle != -1)
      p = SDSPPlayer(state, fileName, volume, fadeIn, fadeOut, handle, music);
  }
}

void CStreamAudioManager::Stop(bool oneshot, std::string_view fileName) {
  SDSPPlayer& p = s_Players[oneshot];
  SDSPPlayer& qp = s_QueuedPlayers[oneshot];

  if (CStringExtras::CompareCaseInsensitive(fileName, qp.x0_fileName)) {
    /* Cancel enqueued file */
    qp = SDSPPlayer();
  } else if (CStringExtras::CompareCaseInsensitive(fileName, p.x0_fileName) && p.x20_internalHandle != -1 &&
             p.x10_playState != EPlayerState::Stopped) {
    /* Fade out or stop */
    if (p.x1c_fadeOut <= FLT_EPSILON)
      StopStreaming(oneshot);
    else
      p.x10_playState = EPlayerState::FadeOut;
  }
}

void CStreamAudioManager::FadeBackIn(bool oneshot, float fadeTime) {
  SDSPPlayer& p = s_Players[oneshot];
  if (p.x10_playState == EPlayerState::Stopped || p.x10_playState == EPlayerState::Playing)
    return;
  p.x18_fadeIn = fadeTime;
  p.x10_playState = EPlayerState::FadeIn;
}

void CStreamAudioManager::TemporaryFadeOut(bool oneshot, float fadeTime) {
  SDSPPlayer& p = s_Players[oneshot];
  if (p.x10_playState == EPlayerState::FadeOut || p.x10_playState == EPlayerState::Stopped)
    return;
  p.x1c_fadeOut = fadeTime;
  p.x10_playState = EPlayerState::FadeOutNoStop;
}

void CStreamAudioManager::StopStreaming(bool oneshot) {
  SDSPPlayer& p = s_Players[oneshot];
  p.x10_playState = EPlayerState::Stopped;
  CDSPStreamManager::StopStreaming(p.x20_internalHandle);
  p.x24_fadeFactor = 0.f;
  p.x20_internalHandle = -1;
}

void CStreamAudioManager::UpdateDSP(bool oneshot, float dt) {
  SDSPPlayer& p = s_Players[oneshot];

  if (p.x10_playState == EPlayerState::Stopped) {
    SDSPPlayer& qp = s_QueuedPlayers[oneshot];
    if (qp.x10_playState != EPlayerState::Stopped) {
      Start(oneshot, qp.x0_fileName, qp.x14_volume, qp.x28_music, qp.x18_fadeIn, qp.x1c_fadeOut);
      qp = SDSPPlayer();
    }
  } else {
    if (p.x10_playState != EPlayerState::Stopped &&
        CDSPStreamManager::GetStreamState(p.x20_internalHandle) == CDSPStreamManager::EState::Oneshot &&
        CDSPStreamManager::CanStop(p.x20_internalHandle)) {
      StopStreaming(oneshot);
      return;
    }

    if ((p.x10_playState != EPlayerState::FadeIn && p.x10_playState != EPlayerState::FadeOut &&
         p.x10_playState != EPlayerState::FadeOutNoStop)) {
      if (p.x10_playState == EPlayerState::Playing)
        CDSPStreamManager::UpdateVolume(p.x20_internalHandle, GetTargetDSPVolume(p.x14_volume, p.x28_music));
      return;
    }

    if (p.x10_playState == EPlayerState::FadeIn) {
      float newFadeFactor = p.x24_fadeFactor + dt / p.x18_fadeIn;
      if (newFadeFactor >= 1.f) {
        p.x24_fadeFactor = 1.f;
        p.x10_playState = EPlayerState::Playing;
      } else {
        p.x24_fadeFactor = newFadeFactor;
      }
    } else if (p.x10_playState == EPlayerState::FadeOut || p.x10_playState == EPlayerState::FadeOutNoStop) {
      float newFadeFactor = p.x24_fadeFactor - dt / p.x1c_fadeOut;
      if (newFadeFactor <= 0.f) {
        if (p.x10_playState == EPlayerState::FadeOutNoStop) {
          p.x24_fadeFactor = 0.f;
        } else {
          StopStreaming(oneshot);
          return;
        }
      } else {
        p.x24_fadeFactor = newFadeFactor;
      }
    }

    CDSPStreamManager::UpdateVolume(p.x20_internalHandle,
                                    GetTargetDSPVolume(p.x14_volume * p.x24_fadeFactor, p.x28_music));
  }
}

void CStreamAudioManager::UpdateDSPStreamers(float dt) {
  UpdateDSP(false, dt);
  UpdateDSP(true, dt);
}

void CStreamAudioManager::StopAllStreams() {
  for (size_t i = 0; i < s_Players.size(); ++i) {
    StopStreaming(bool(i));
    SDSPPlayer& p = s_Players[i];
    SDSPPlayer& qp = s_QueuedPlayers[i];
    p = SDSPPlayer();
    qp = SDSPPlayer();
  }
}

void CStreamAudioManager::Update(float dt) {
  CDSPStreamManager::PollHeaderReadCompletions();
  UpdateDSPStreamers(dt);
}

void CStreamAudioManager::StopAll() { StopAllStreams(); }

void CStreamAudioManager::SetMusicUnmute(bool unmute) { g_MusicUnmute = unmute; }

void CStreamAudioManager::SetSfxVolume(u8 volume) { g_SfxVolume = std::min(volume, u8(127)); }

void CStreamAudioManager::SetMusicVolume(u8 volume) { g_MusicVolume = std::min(volume, u8(127)); }

void CStreamAudioManager::Initialize() { CDSPStreamManager::Initialize(); }

void CStreamAudioManager::StopOneShot() {
  CStreamAudioManager::StopStreaming(true);
  SDSPPlayer& p = s_Players[1];
  p = SDSPPlayer();
  SDSPPlayer& qp = s_QueuedPlayers[1];
  qp = SDSPPlayer();
}

void CStreamAudioManager::Shutdown() { CDSPStreamManager::Shutdown(); }

u8 CStreamAudioManager::g_MusicVolume = 0x7f;
u8 CStreamAudioManager::g_SfxVolume = 0x7f;
bool CStreamAudioManager::g_MusicUnmute = true;
bool CStreamAudioManager::g_SfxUnmute = true;

} // namespace metaforce


================================================
FILE: Runtime/Audio/CStreamAudioManager.hpp
================================================
#pragma once

#include <string_view>

#include "Runtime/GCNTypes.hpp"

namespace metaforce {

class CStreamAudioManager {
  static u8 g_MusicVolume;
  static u8 g_SfxVolume;
  static bool g_MusicUnmute;
  static bool g_SfxUnmute;

  static float GetTargetDSPVolume(float fileVol, bool music);
  static void StopStreaming(bool oneshot);
  static void UpdateDSP(bool oneshot, float dt);
  static void UpdateDSPStreamers(float dt);
  static void StopAllStreams();

public:
  static void Start(bool oneshot, std::string_view fileName, float volume, bool music, float fadeIn, float fadeOut);
  static void Stop(bool oneshot, std::string_view fileName);
  static void FadeBackIn(bool oneshot, float fadeTime);
  static void TemporaryFadeOut(bool oneshot, float fadeTime);
  static void Update(float dt);
  static void StopAll();
  static void SetMusicUnmute(bool unmute);
  static void SetSfxVolume(u8 volume);
  static void SetMusicVolume(u8 volume);

  static void Initialize();
  static void StopOneShot();
  static void Shutdown();
};

} // namespace metaforce


================================================
FILE: Runtime/Audio/SFX/Atomic.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Atomic
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPAtomic 1

#define SFXelu_a_elec_lp_00 42
#define SFXat2_b_fly_lp_00 43
#define SFXatm_b_fly_lp_00 44
#define SFXatm_b_fly_lp_01 45
#define SFXatm_a_bombdrp_00 46
#define SFXsfx002F 47
#define SFXsfx0030 48
#define SFXsfx0031 49
#define SFXsfx0032 50
#define SFXsfx0033 51
#define SFXsfx0034 52
#define SFXsfx0035 53
#define SFXsfx0036 54
#define SFXsfx0037 55
#define SFXsfx0038 56
#define SFXsfx0039 57
#define SFXsfx003A 58
#define SFXsfx003B 59


================================================
FILE: Runtime/Audio/SFX/BetaBeetle.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: BetaBeetle
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPBetaBeetle 2

#define SFXsfx003C 60
#define SFXsfx003D 61
#define SFXsfx003E 62
#define SFXsfx003F 63
#define SFXsfx0040 64
#define SFXsfx0041 65
#define SFXsfx0042 66
#define SFXsfx0043 67
#define SFXsfx0044 68
#define SFXsfx0045 69
#define SFXsfx0046 70
#define SFXsfx0047 71
#define SFXsfx0048 72
#define SFXsfx0049 73
#define SFXsfx004A 74
#define SFXsfx004B 75
#define SFXsfx004C 76
#define SFXsfx004D 77
#define SFXsfx004E 78
#define SFXsfx004F 79
#define SFXsfx0050 80
#define SFXsfx0051 81
#define SFXsfx0052 82
#define SFXsfx0053 83
#define SFXsfx0054 84
#define SFXsfx0055 85
#define SFXsfx0056 86
#define SFXsfx0057 87
#define SFXsfx0058 88
#define SFXsfx0059 89
#define SFXsfx005A 90
#define SFXsfx005B 91


================================================
FILE: Runtime/Audio/SFX/Bird.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Bird
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPBird 3

#define SFXsfx005C 92
#define SFXsfx005D 93
#define SFXsfx005E 94
#define SFXsfx005F 95
#define SFXsfx0060 96
#define SFXsfx0061 97
#define SFXsfx0062 98


================================================
FILE: Runtime/Audio/SFX/BloodFlower.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: BloodFlower
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPBloodFlower 4

#define SFXblf_a_btmspit_00 99
#define SFXblf_a_bulb_00 100
#define SFXsfx0065 101
#define SFXsfx0066 102
#define SFXsfx0067 103
#define SFXblf_b_active_00 104
#define SFXblf_b_active_01 105
#define SFXsfx006A 106
#define SFXblf_b_breathe_00 107
#define SFXsfx006C 108
#define SFXsfx006D 109
#define SFXsfx006E 110
#define SFXsfx006F 111
#define SFXblf_r_death_00 112
#define SFXblf_r_death_01 113
#define SFXblf_r_impact_00 114
#define SFXfir_x_crispfire6voice_lp_00 115
#define SFXsfx0074 116
#define SFXsfx0075 117
#define SFXsfx0076 118
#define SFXsfx0077 119


================================================
FILE: Runtime/Audio/SFX/Burrower.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Burrower
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPBurrower 5

#define SFXbur_a_attack_00 120
#define SFXbur_b_burrow_lp_00 121
#define SFXbur_b_idle_00 122
#define SFXbur_b_idle_01 123
#define SFXbur_b_walk_00 124
#define SFXbur_b_walk_01 125
#define SFXbur_b_walk_02 126
#define SFXbur_r_death_00 127
#define SFXsfx0080 128
#define SFXsfx0081 129
#define SFXsfx0082 130
#define SFXsfx0083 131
#define SFXsfx0084 132
#define SFXsfx0085 133
#define SFXsfx0086 134
#define SFXsfx0087 135
#define SFXsfx0088 136
#define SFXsfx0089 137
#define SFXsfx008A 138
#define SFXsfx008B 139


================================================
FILE: Runtime/Audio/SFX/ChozoGhost.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: ChozoGhost
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPChozoGhost 6

#define SFXchg_a_dball_00 140
#define SFXchg_a_dcharge_00 141
#define SFXchg_a_dfire_00 142
#define SFXsfx008F 143
#define SFXsfx0090 144
#define SFXsfx0091 145
#define SFXsfx0092 146
#define SFXsfx0093 147
#define SFXsfx0094 148
#define SFXchg_a_pball_00 149
#define SFXchg_a_pfire_00 150
#define SFXsfx0097 151
#define SFXsfx0098 152
#define SFXsfx0099 153
#define SFXsfx009A 154
#define SFXchg_b_fadein_00 155
#define SFXsfx009C 156
#define SFXchg_b_float_00 157
#define SFXchg_b_growl_00 158
#define SFXchg_b_jump_00 159
#define SFXsfx00A0 160
#define SFXsfx00A1 161
#define SFXsfx00A2 162
#define SFXsfx00A3 163
#define SFXsfx00A4 164
#define SFXchg_r_death_00 165
#define SFXchg_r_hit_00 166
#define SFXchg_a_pcharge_00 167
#define SFXsfx00A8 168
#define SFXsfx00A9 169
#define SFXchg_b_growl_01 170
#define SFXchg_b_scrape_00 171
#define SFXchg_r_death_01 172
#define SFXsfx00AD 173
#define SFXchg_b_growl_03 174
#define SFXchg_b_growl_04 175
#define SFXsfx00B0 176
#define SFXchg_b_voxalert_00 177
#define SFXsfx00B2 178
#define SFXchg_b_warpin_00 179
#define SFXsfx00B4 180
#define SFXsfx00B5 181
#define SFXsfx00B6 182
#define SFXsfx00B7 183
#define SFXsfx00B8 184
#define SFXsfx00B9 185
#define SFXsfx00BA 186
#define SFXsfx00BB 187
#define SFXsfx00BC 188
#define SFXsfx00BD 189
#define SFXsfx00BE 190
#define SFXsfx00BF 191


================================================
FILE: Runtime/Audio/SFX/ChubbWeed.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: ChubbWeed
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPChubbWeed 7

#define SFXchb_r_scream_00 192
#define SFXchb_r_alert_00_lp 193
#define SFXsfx00C2 194
#define SFXsfx00C3 195
#define SFXsfx00C4 196
#define SFXsfx00C5 197
#define SFXsfx00C6 198


================================================
FILE: Runtime/Audio/SFX/CineBoots.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineBoots
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineBoots 59

#define SFXci7_x_jump_00 2972
#define SFXsja_c_electric_lp_00 2973
#define SFXsfx0B9E 2974
#define SFXsfx0B9F 2975
#define SFXsfx0BA0 2976
#define SFXsfx0BA1 2977
#define SFXsfx0BA2 2978
#define SFXsfx0BA3 2979
#define SFXsfx0BA4 2980
#define SFXsfx0BA5 2981
#define SFXsfx0BA6 2982
#define SFXsfx0BA7 2983
#define SFXsfx0BA8 2984
#define SFXsfx0BA9 2985
#define SFXsfx0BAA 2986
#define SFXsfx0BAB 2987
#define SFXsfx0BAC 2988
#define SFXsfx0BAD 2989
#define SFXsfx0BAE 2990
#define SFXsfx0BAF 2991


================================================
FILE: Runtime/Audio/SFX/CineGeneral.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineGeneral
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineGeneral 60

#define SFXsfx0BB0 2992
#define SFXsfx0BB1 2993
#define SFXci5_x_mapdown_00 2994
#define SFXci5_x_mapload_lp_00 2995
#define SFXci5_x_mapspin_lp_00 2996
#define SFXci5_x_mapup_00 2997
#define SFXepr_b_grenup_00 2998
#define SFXpi2_x_missile_00 2999
#define SFXpi2_x_healthsm_00 3000
#define SFXpi2_x_smissile_00 3001
#define SFXsfx0BBA 3002
#define SFXsfx0BBB 3003
#define SFXsfx0BBC 3004
#define SFXsfx0BBD 3005
#define SFXci9_x_nrg_lp_00 3006
#define SFXsfx0BBF 3007
#define SFXci9_x_insert_00 3008
#define SFXsfx0BC1 3009
#define SFXsfx0BC2 3010
#define SFXsfx0BC3 3011
#define SFXsfx0BC4 3012
#define SFXsfx0BC5 3013
#define SFXsfx0BC6 3014
#define SFXsfx0BC7 3015
#define SFXsfx0BC8 3016
#define SFXsfx0BC9 3017
#define SFXsfx0BCA 3018
#define SFXsfx0BCB 3019
#define SFXsfx0BCC 3020
#define SFXsfx0BCD 3021
#define SFXsfx0BCE 3022
#define SFXsfx0BCF 3023
#define SFXsfx0BD0 3024
#define SFXsfx0BD1 3025
#define SFXsfx0BD2 3026
#define SFXsfx0BD3 3027
#define SFXsfx0BD4 3028
#define SFXsfx0BD5 3029
#define SFXsfx0BD6 3030
#define SFXsfx0BD7 3031
#define SFXsfx0BD8 3032


================================================
FILE: Runtime/Audio/SFX/CineGun.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineGun
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineGun 62

#define SFXsfx0BE5 3045
#define SFXci3_x_clank_00 3046
#define SFXci4_x_clank_00 3047
#define SFXsfx0BE8 3048
#define SFXci3_c_ridiclaw_00 3049
#define SFXsfx0BEA 3050
#define SFXsfx0BEB 3051
#define SFXsfx0BEC 3052
#define SFXsfx0BED 3053
#define SFXsfx0BEE 3054
#define SFXsfx0BEF 3055
#define SFXsfx0BF0 3056
#define SFXsfx0BF1 3057
#define SFXsfx0BF2 3058


================================================
FILE: Runtime/Audio/SFX/CineMorphball.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineMorphball
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineMorphball 63

#define SFXsfx0BF3 3059
#define SFXsfx0BF4 3060
#define SFXsfx0BF5 3061
#define SFXsfx0BF6 3062
#define SFXsfx0BF7 3063
#define SFXsfx0BF8 3064
#define SFXsfx0BF9 3065
#define SFXsfx0BFA 3066
#define SFXsfx0BFB 3067
#define SFXsfx0BFC 3068


================================================
FILE: Runtime/Audio/SFX/CineSuit.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineSuit
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineSuit 64

#define SFXci2_x_energy_lp_00 3069
#define SFXci2_x_energy_lp_01 3070
#define SFXsfx0BFF 3071
#define SFXsfx0C00 3072
#define SFXci2_x_jump_00 3073
#define SFXsfx0C02 3074
#define SFXci2_x_lights_lp_00 3075
#define SFXci2_x_pad_lp_00 3076
#define SFXsfx0C05 3077
#define SFXsfx0C06 3078
#define SFXci3_x_energy_02 3079
#define SFXsfx0C08 3080
#define SFXsfx0C09 3081
#define SFXci3_x_whoosh_00 3082
#define SFXsfx0C0B 3083
#define SFXsfx0C0C 3084
#define SFXsfx0C0D 3085
#define SFXsfx0C0E 3086
#define SFXsfx0C0F 3087
#define SFXsfx0C10 3088
#define SFXsfx0C11 3089
#define SFXsfx0C12 3090
#define SFXsfx0C13 3091
#define SFXsfx0C14 3092
#define SFXsfx0C15 3093


================================================
FILE: Runtime/Audio/SFX/CineVisor.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: CineVisor
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCineVisor 61

#define SFXcin_x_visor_00 3033
#define SFXsfx0BDA 3034
#define SFXsfx0BDB 3035
#define SFXsfx0BDC 3036
#define SFXsfx0BDD 3037
#define SFXsfx0BDE 3038
#define SFXsfx0BDF 3039
#define SFXsfx0BE0 3040
#define SFXsfx0BE1 3041
#define SFXsfx0BE2 3042
#define SFXsfx0BE3 3043
#define SFXsfx0BE4 3044


================================================
FILE: Runtime/Audio/SFX/Crater.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Crater
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCrater 44

#define SFXsfx0764 1892
#define SFXsfx0765 1893
#define SFXsfx0766 1894
#define SFXsfx0767 1895
#define SFXsfx0768 1896
#define SFXsfx0769 1897
#define SFXsfx076A 1898
#define SFXsfx076B 1899
#define SFXsfx076C 1900
#define SFXsfx076D 1901
#define SFXsfx076E 1902
#define SFXsfx076F 1903
#define SFXsfx0770 1904
#define SFXsfx0771 1905
#define SFXsfx0772 1906
#define SFXsfx0773 1907
#define SFXsfx0774 1908
#define SFXsfx0775 1909
#define SFXsfx0776 1910
#define SFXsfx0777 1911
#define SFXsfx0778 1912
#define SFXsfx0779 1913
#define SFXsfx077A 1914
#define SFXsfx077B 1915
#define SFXsfx077C 1916
#define SFXsfx077D 1917
#define SFXsfx077E 1918
#define SFXsfx077F 1919
#define SFXsfx0780 1920
#define SFXsfx0781 1921


================================================
FILE: Runtime/Audio/SFX/Crystallite.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Crystallite
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPCrystallite 8

#define SFXcry_b_idle_00 199
#define SFXsfx00C8 200
#define SFXsfx00C9 201
#define SFXsfx00CA 202
#define SFXsfx00CB 203
#define SFXsfx00CC 204
#define SFXsfx00CD 205
#define SFXsfx00CE 206
#define SFXsfx00CF 207
#define SFXsfx00D0 208


================================================
FILE: Runtime/Audio/SFX/Drones.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Drones
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPDrones 9

#define SFXepr_a_shockhit_00 209
#define SFXsfx00D2 210
#define SFXdrn_b_burst_00 211
#define SFXsfx00D4 212
#define SFXsfx00D5 213
#define SFXsfx00D6 214
#define SFXsfx00D7 215
#define SFXdrn_b_patrol_lp_00 216
#define SFXdrn_b_henshin_00 217
#define SFXdrn_b_rocket_lp_00 218
#define SFXdrn_b_rocket_lp_01 219
#define SFXdrn_b_rocket_lp_02 220
#define SFXsfx00DD 221
#define SFXdrn_r_death_00 222
#define SFXsfx00DF 223
#define SFXsfx00E0 224
#define SFXdrn_r_impact_00 225
#define SFXsfx00E2 226
#define SFXdrn_a_blast_00 227
#define SFXsfx00E4 228
#define SFXdrn_r_death_lp_00 229
#define SFXsfx00E6 230
#define SFXdrn_b_alert_00 231
#define SFXsfx00E8 232
#define SFXdrn_a_laser_00 233
#define SFXsfx00EA 234
#define SFXsfx00EB 235
#define SFXsfx00EC 236
#define SFXsfx00ED 237
#define SFXdrn_r_impact_01 238
#define SFXsfx00EF 239
#define SFXdrn_a_blast_01 240
#define SFXsfx00F1 241
#define SFXsfx00F2 242
#define SFXdrn_b_henshin_01 243
#define SFXdrn_b_talk_00 244
#define SFXsfx00F5 245
#define SFXdrn_r_death_lp_01 246
#define SFXdrn_a_charge_00 247
#define SFXdrn_b_beep_03 248
#define SFXsfx00F9 249
#define SFXdrn_r_empblast_01 250
#define SFXsfx00FB 251
#define SFXsfx00FC 252
#define SFXdrn_b_patrolun_lp_00 253
#define SFXdrn_a_laserun_00 254
#define SFXopr_a_shockhit_00 255
#define SFXsfx0100 256
#define SFXsfx0101 257
#define SFXsfx0102 258
#define SFXsfx0103 259
#define SFXsfx0104 260
#define SFXsfx0105 261
#define SFXsfx0106 262
#define SFXsfx0107 263
#define SFXsfx0108 264
#define SFXsfx0109 265
#define SFXsfx010A 266
#define SFXsfx010B 267
#define SFXsfx010C 268


================================================
FILE: Runtime/Audio/SFX/EliteSpacePirate.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: EliteSpacePirate
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPEliteSpacePirate 10

#define SFXepr_a_grenade_00 269
#define SFXsfx010E 270
#define SFXsfx010F 271
#define SFXepr_b_hitglass_00 272
#define SFXepr_a_swoosh_00 273
#define SFXepr_b_run_00 274
#define SFXepr_b_run_01 275
#define SFXepr_a_shokwave_00 276
#define SFXsfx0115 277
#define SFXepr_a_attack_00 278
#define SFXepr_a_attack_01 279
#define SFXepr_b_land_00 280
#define SFXepr_b_alert_00 281
#define SFXepr_b_walk_00 282
#define SFXepr_b_walk_01 283
#define SFXepr_b_alert_01 284
#define SFXepr_b_absorb_lp_00 285
#define SFXepr_b_idle_00 286
#define SFXepr_b_idle_01 287
#define SFXepr_a_hitgrnd_00 288
#define SFXepr_b_walklite_00 289
#define SFXepr_b_walklite_01 290
#define SFXepr_r_pissed_00 291
#define SFXsfx0124 292
#define SFXsfx0125 293
#define SFXepr_a_swoosh_01 294
#define SFXepr_b_taunt_00 295
#define SFXopr_a_swoosh_00 296
#define SFXopr_a_swoosh_01 297
#define SFXepr_b_blokvox_00 298
#define SFXsfx012B 299
#define SFXopr_a_shokwave_00 300
#define SFXsfx012D 301
#define SFXopr_b_absorb_lp_00 302
#define SFXsfx012F 303
#define SFXsfx0130 304
#define SFXsfx0131 305
#define SFXsfx0132 306
#define SFXsfx0133 307
#define SFXsfx0134 308
#define SFXsfx0135 309
#define SFXsfx0136 310
#define SFXsfx0137 311
#define SFXsfx0138 312
#define SFXsfx0139 313
#define SFXsfx013A 314
#define SFXsfx013B 315
#define SFXsfx013C 316
#define SFXsfx013D 317
#define SFXsfx013E 318
#define SFXsfx013F 319
#define SFXsfx0140 320
#define SFXsfx0141 321
#define SFXsfx0142 322


================================================
FILE: Runtime/Audio/SFX/FireFlea.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: FireFlea
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPFireFlea 11

#define SFXfif_b_idle_lp_00 323
#define SFXsfx0144 324
#define SFXfif_b_light_00 325
#define SFXfif_r_death_00 326
#define SFXfif_r_death_01 327
#define SFXfif_r_explode_00 328
#define SFXfif_r_impact_00 329
#define SFXsfx014A 330
#define SFXsfx014B 331
#define SFXsfx014C 332
#define SFXsfx014D 333
#define SFXsfx014E 334
#define SFXsfx014F 335


================================================
FILE: Runtime/Audio/SFX/Flaaghra.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Flaaghra
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPFlaaghra 52

#define SFXfla_a_hitgrnd_00 2600
#define SFXfla_a_swoosh_00 2601
#define SFXfla_a_swoosh_01 2602
#define SFXfla_a_voxattak_00 2603
#define SFXfla_a_voxattak_01 2604
#define SFXfla_b_grow_00 2605
#define SFXfla_b_idle_00 2606
#define SFXsfx0A2F 2607
#define SFXfla_b_voxangry_00 2608
#define SFXfla_b_voxangry_01 2609
#define SFXfla_r_death_00 2610
#define SFXfla_r_death_01 2611
#define SFXfla_r_death_02 2612
#define SFXsfx0A35 2613
#define SFXfla_r_faint_01 2614
#define SFXfla_r_pain_00 2615
#define SFXsfx0A38 2616
#define SFXfla_a_shoot_00 2617
#define SFXfla_a_spit_00 2618
#define SFXfla_a_spit_01 2619
#define SFXsfx0A3C 2620
#define SFXsfx0A3D 2621
#define SFXfla_a_charge_00 2622
#define SFXsfx0A3F 2623
#define SFXsfx0A40 2624
#define SFXfla_b_idlesm_00 2625
#define SFXfla_a_chargevox_00 2626
#define SFXsfx0A43 2627
#define SFXsfx0A44 2628
#define SFXsfx0A45 2629
#define SFXfla_a_shootvox_00 2630
#define SFXsfx0A47 2631
#define SFXsfx0A48 2632
#define SFXsfx0A49 2633
#define SFXsfx0A4A 2634
#define SFXsfx0A4B 2635
#define SFXfla_a_spitvox_00 2636
#define SFXfla_a_spitvox_01 2637
#define SFXsfx0A4E 2638
#define SFXsfx0A4F 2639
#define SFXsfx0A50 2640
#define SFXsfx0A51 2641
#define SFXsfx0A52 2642
#define SFXfla_a_sporevox_01 2643
#define SFXfla_a_hitgrnd_01 2644
#define SFXsfx0A55 2645
#define SFXfla_r_landgrnd_00 2646
#define SFXsfx0A57 2647
#define SFXsfx0A58 2648
#define SFXfla_b_grow_01 2649
#define SFXfla_b_rise_lp_00 2650
#define SFXsfx0A5B 2651
#define SFXfla_b_dizzy_00 2652
#define SFXsfx0A5D 2653
#define SFXsfx0A5E 2654
#define SFXfla_r_painsh_00 2655
#define SFXsfx0A60 2656
#define SFXfla_b_humor_00 2657
#define SFXfla_r_painbig_00 2658
#define SFXfla_b_dizzyout_00 2659
#define SFXfla_b_faintout_00 2660
#define SFXsfx0A65 2661
#define SFXfla_b_dizzy_lp_01 2662
#define SFXsfx0A67 2663
#define SFXsfx0A68 2664
#define SFXsfx0A69 2665
#define SFXsfx0A6A 2666
#define SFXfla_b_voxshrnk_00 2667
#define SFXsfx0A6C 2668
#define SFXsfx0A6D 2669
#define SFXfla_b_voxshrnk_03 2670
#define SFXsfx0A6F 2671
#define SFXsfx0A70 2672
#define SFXsfx0A71 2673
#define SFXsfx0A72 2674
#define SFXsfx0A73 2675
#define SFXsfx0A74 2676
#define SFXsfx0A75 2677
#define SFXsfx0A76 2678
#define SFXsfx0A77 2679
#define SFXsfx0A78 2680


================================================
FILE: Runtime/Audio/SFX/FlickerBat.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: FlickerBat
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPFlickerBat 12

#define SFXflk_b_flicker_00 336
#define SFXflk_b_talk_00 337
#define SFXflk_b_talk_01 338
#define SFXsfx0153 339
#define SFXsfx0154 340
#define SFXflk_r_impact_00 341
#define SFXsfx0156 342
#define SFXsfx0157 343
#define SFXsfx0158 344
#define SFXsfx0159 345
#define SFXsfx015A 346
#define SFXsfx015B 347


================================================
FILE: Runtime/Audio/SFX/FlyingPirate.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: FlyingPirate
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPFlyingPirate 13

#define SFXsfx015C 348
#define SFXfpr_a_chaff_00 349
#define SFXsfx015E 350
#define SFXupr_a_mislfire_00 351
#define SFXsfx0160 352
#define SFXsfx0161 353
#define SFXfpr_a_mislfire_00 354
#define SFXfpr_b_thrust_01 355
#define SFXsfx0164 356
#define SFXfpr_b_engine_lp_00 357
#define SFXfpr_b_engine_lp_01 358
#define SFXfpr_b_engine_lp_02 359
#define SFXfpr_b_voxangry_02 360
#define SFXfpr_b_thrust_00 361
#define SFXsfx016A 362
#define SFXfpr_r_die_00 363
#define SFXfpr_b_intruder_00 364
#define SFXfpr_b_voxalert_00 365
#define SFXfpr_a_mislload_00 366
#define SFXfpr_b_voxangry_00 367
#define SFXsfx0170 368
#define SFXfpr_r_impact_00 369
#define SFXsfx0172 370
#define SFXsfx0173 371
#define SFXsfx0174 372
#define SFXfpr_b_engidle_lp_00 373
#define SFXsfx0176 374
#define SFXfpr_b_blastoff_lp_00 375
#define SFXfpr_b_blastoff_01 376
#define SFXupr_a_mislload_00 377
#define SFXupr_b_engidle_lp_00 378
#define SFXupr_b_engine_lp_00 379
#define SFXupr_b_engine_lp_01 380
#define SFXupr_b_engine_lp_02 381
#define SFXsfx017E 382
#define SFXsfx017F 383
#define SFXupr_b_voxalert_00 384
#define SFXsfx0181 385
#define SFXupr_b_voxangry_00 386
#define SFXsfx0183 387
#define SFXupr_b_voxangry_02 388
#define SFXupr_r_die_00 389
#define SFXupr_r_impact_00 390
#define SFXsfx0187 391
#define SFXsfx0188 392
#define SFXsfx0189 393
#define SFXsfx018A 394
#define SFXsfx018B 395
#define SFXsfx018C 396
#define SFXsfx018D 397
#define SFXsfx018E 398
#define SFXsfx018F 399
#define SFXsfx0190 400
#define SFXsfx0191 401
#define SFXsfx0192 402
#define SFXsfx0193 403
#define SFXsfx0194 404
#define SFXsfx0195 405
#define SFXsfx0196 406


================================================
FILE: Runtime/Audio/SFX/FrontEnd.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: FrontEnd
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPFrontEnd 38

#define SFXfnt_transfore_00L 1090
#define SFXfnt_advance_R 1091
#define SFXsfx0444 1092
#define SFXfnt_selection_change 1093
#define SFXfnt_back 1094
#define SFXfnt_enum_change 1095
#define SFXfnt_advance_L 1096
#define SFXfnt_transfore_00R 1097
#define SFXfnt_transfore_01L 1098
#define SFXfnt_transfore_01R 1099
#define SFXfnt_transfore_02L 1100
#define SFXfnt_transfore_02R 1101
#define SFXfnt_transback_00L 1102
#define SFXfnt_transback_00R 1103
#define SFXfnt_transback_01L 1104
#define SFXfnt_transback_01R 1105
#define SFXfnt_transback_02L 1106
#define SFXfnt_transback_02R 1107
#define SFXfnt_tofusion_L 1108
#define SFXfnt_tofusion_R 1109
#define SFXfnt_fromfusion_L 1110
#define SFXfnt_fromfusion_R 1111
#define SFXsfx0458 1112
#define SFXsfx0459 1113
#define SFXsfx045A 1114
#define SFXsfx045B 1115
#define SFXsfx045C 1116
#define SFXsfx045D 1117
#define SFXsfx045E 1118
#define SFXsfx045F 1119
#define SFXsfx0460 1120
#define SFXsfx0461 1121
#define SFXsfx0462 1122
#define SFXsfx0463 1123
#define SFXsfx0464 1124
#define SFXsfx0465 1125
#define SFXsfx0466 1126
#define SFXsfx0467 1127


================================================
FILE: Runtime/Audio/SFX/GagantuanBeatle.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: GagantuanBeatle
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPGagantuanBeatle 14

#define SFXgab_r_hitlight_01 407
#define SFXga2_b_digexplod_00 408
#define SFXga2_b_digscream_00 409
#define SFXga2_b_idle_01 410
#define SFXga2_b_scrapedirt_00 411
#define SFXgab_b_walkdirt_02 412
#define SFXgab_b_rundirt_00 413
#define SFXgab_b_rundirt_01 414
#define SFXsfx019F 415
#define SFXgab_a_attack_00 416
#define SFXgab_a_attack_01 417
#define SFXgab_b_idle_03 418
#define SFXgab_b_digexplod_00 419
#define SFXfla_b_scrapedirt_00 420
#define SFXgab_b_idle_02 421
#define SFXgab_b_idle_00 422
#define SFXgab_b_idle_01 423
#define SFXgab_b_walkdirt_00 424
#define SFXgab_b_walkdirt_01 425
#define SFXgab_r_collide_00 426
#define SFXsfx01AB 427
#define SFXgab_r_death_01 428
#define SFXgab_r_detect_00 429
#define SFXgab_r_hitlight_00 430
#define SFXgab_b_digscream_00 431
#define SFXgab_b_scrapedirt_00 432
#define SFXga2_b_dig_lp_00 433
#define SFXga2_b_rundirt_00 434
#define SFXgab_b_dig_lp_00 435
#define SFXga2_b_rundirt_01 436
#define SFXga2_b_rundirt_02 437
#define SFXga2_b_walkdirt_00 438
#define SFXga2_b_walkdirt_01 439
#define SFXga2_b_walkdirt_02 440
#define SFXga2_r_collide_00 441
#define SFXga2_a_attack_00 442
#define SFXsfx01BB 443
#define SFXsfx01BC 444
#define SFXsfx01BD 445
#define SFXsfx01BE 446
#define SFXsfx01BF 447
#define SFXsfx01C0 448
#define SFXsfx01C1 449
#define SFXsfx01C2 450
#define SFXsfx01C3 451
#define SFXsfx01C4 452
#define SFXsfx01C5 453
#define SFXsfx01C6 454
#define SFXsfx01C7 455
#define SFXsfx01C8 456
#define SFXsfx01C9 457
#define SFXsfx01CA 458


================================================
FILE: Runtime/Audio/SFX/Gnats.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Gnats
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPGnats 15

#define SFXsfx01CB 459
#define SFXsfx01CC 460
#define SFXsfx01CD 461
#define SFXsfx01CE 462
#define SFXsfx01CF 463
#define SFXsfx01D0 464
#define SFXsfx01D1 465


================================================
FILE: Runtime/Audio/SFX/Gryzbee.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Gryzbee
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPGryzbee 16

#define SFXgrz_b_idle_00 466
#define SFXsfx01D3 467
#define SFXsfx01D4 468
#define SFXsfx01D5 469
#define SFXsfx01D6 470
#define SFXsfx01D7 471
#define SFXsfx01D8 472
#define SFXsfx01D9 473
#define SFXsfx01DA 474
#define SFXsfx01DB 475
#define SFXsfx01DC 476
#define SFXsfx01DD 477


================================================
FILE: Runtime/Audio/SFX/IceCrack.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: IceCrack
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPIceCrack 67

#define SFXsfx0C31 3121
#define SFXsfx0C32 3122
#define SFXsfx0C33 3123
#define SFXsfx0C34 3124
#define SFXsfx0C35 3125
#define SFXsfx0C36 3126
#define SFXcrk_break_subsequent 3127
#define SFXcrk_break_initial 3128
#define SFXcrk_break_final 3129
#define SFXsfx0C3A 3130
#define SFXsfx0C3B 3131
#define SFXsfx0C3C 3132
#define SFXsfx0C3D 3133
#define SFXsfx0C3E 3134
#define SFXsfx0C3F 3135
#define SFXsfx0C40 3136
#define SFXsfx0C41 3137
#define SFXsfx0C42 3138
#define SFXsfx0C43 3139
#define SFXsfx0C44 3140


================================================
FILE: Runtime/Audio/SFX/IceWorld.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: IceWorld
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPIceWorld 45

#define SFXice_x_gateopen_lp_00 1922
#define SFXice_x_gatestop_00 1923
#define SFXsfx0784 1924
#define SFXice_x_towercrk_00 1925
#define SFXice_ballroll_ice 1926
#define SFXice_ballroll_snow 1927
#define SFXsfx0788 1928
#define SFXice_x_towerlnd_00 1929
#define SFXsfx078A 1930
#define SFXice_x_towerlnd_01 1931
#define SFXice_x_towercrk_01 1932
#define SFXice_x_towercrk_02 1933
#define SFXsfx078E 1934
#define SFXsfx078F 1935
#define SFXsfx0790 1936
#define SFXsfx0791 1937
#define SFXsfx0792 1938
#define SFXsfx0793 1939
#define SFXsfx0794 1940
#define SFXsfx0795 1941
#define SFXsfx0796 1942
#define SFXsfx0797 1943
#define SFXsfx0798 1944
#define SFXsfx0799 1945
#define SFXsfx079A 1946
#define SFXsfx079B 1947
#define SFXsfx079C 1948
#define SFXsfx079D 1949
#define SFXsfx079E 1950
#define SFXsfx079F 1951
#define SFXsfx07A0 1952
#define SFXsfx07A1 1953
#define SFXsfx07A2 1954
#define SFXsfx07A3 1955
#define SFXsfx07A4 1956
#define SFXsfx07A5 1957
#define SFXsfx07A6 1958
#define SFXsfx07A7 1959
#define SFXsfx07A8 1960
#define SFXsfx07A9 1961
#define SFXsfx07AA 1962
#define SFXsfx07AB 1963
#define SFXsfx07AC 1964
#define SFXsfx07AD 1965
#define SFXsfx07AE 1966
#define SFXsfx07AF 1967
#define SFXtha_b_rockup_lp_00 1968
#define SFXsfx07B1 1969
#define SFXsfx07B2 1970
#define SFXice_x_ridflap_00 1971
#define SFXsfx07B4 1972
#define SFXsfx07B5 1973
#define SFXsfx07B6 1974
#define SFXice_x_pump_00 1975
#define SFXsfx07B8 1976
#define SFXsfx07B9 1977
#define SFXsfx07BA 1978
#define SFXsfx07BB 1979
#define SFXsfx07BC 1980
#define SFXsfx07BD 1981
#define SFXice_x_piston_00 1982
#define SFXice_x_piston_lp_00 1983
#define SFXsfx07C0 1984
#define SFXsfx07C1 1985
#define SFXsfx07C2 1986
#define SFXsfx07C3 1987
#define SFXsfx07C4 1988
#define SFXsfx07C5 1989
#define SFXsfx07C6 1990
#define SFXsfx07C7 1991
#define SFXsfx07C8 1992
#define SFXsfx07C9 1993
#define SFXtha_b_debris_00 1994
#define SFXtha_b_debris_01 1995
#define SFXsfx07CC 1996
#define SFXsfx07CD 1997
#define SFXsfx07CE 1998
#define SFXsfx07CF 1999
#define SFXsfx07D0 2000
#define SFXsfx07D1 2001
#define SFXsfx07D2 2002
#define SFXsfx07D3 2003
#define SFXsfx07D4 2004
#define SFXsfx07D5 2005
#define SFXsfx07D6 2006
#define SFXsfx07D7 2007
#define SFXsfx07D8 2008
#define SFXsfx07D9 2009
#define SFXsfx07DA 2010
#define SFXsfx07DB 2011
#define SFXsfx07DC 2012
#define SFXsfx07DD 2013
#define SFXsfx07DE 2014
#define SFXsfx07DF 2015
#define SFXsfx07E0 2016
#define SFXsfx07E1 2017
#define SFXsfx07E2 2018
#define SFXsfx07E3 2019
#define SFXsfx07E4 2020
#define SFXsfx07E5 2021
#define SFXsfx07E6 2022
#define SFXsfx07E7 2023
#define SFXsfx07E8 2024
#define SFXsfx07E9 2025
#define SFXsfx07EA 2026
#define SFXsfx07EB 2027
#define SFXsfx07EC 2028
#define SFXsfx07ED 2029
#define SFXsfx07EE 2030
#define SFXsfx07EF 2031
#define SFXsfx07F0 2032
#define SFXsfx07F1 2033
#define SFXsfx07F2 2034
#define SFXsfx07F3 2035
#define SFXsfx07F4 2036
#define SFXsfx07F5 2037
#define SFXsfx07F6 2038
#define SFXsfx07F7 2039
#define SFXsfx07F8 2040
#define SFXsfx07F9 2041


================================================
FILE: Runtime/Audio/SFX/InjuredPirates.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: InjuredPirates
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPInjuredPirates 17

#define SFXsfx01DE 478
#define SFXsfx01DF 479
#define SFXspr_b_exhale_00 480
#define SFXsfx01E1 481
#define SFXspr_b_moan_00 482
#define SFXsfx01E3 483
#define SFXsfx01E4 484
#define SFXsfx01E5 485
#define SFXsfx01E6 486
#define SFXsfx01E7 487
#define SFXsfx01E8 488
#define SFXsfx01E9 489
#define SFXsfx01EA 490
#define SFXsfx01EB 491
#define SFXsfx01EC 492
#define SFXsfx01ED 493
#define SFXsfx01EE 494
#define SFXsfx01EF 495
#define SFXsfx01F0 496
#define SFXsfx01F1 497
#define SFXsfx01F2 498
#define SFXsfx01F3 499
#define SFXsfx01F4 500
#define SFXsfx01F5 501
#define SFXsfx01F6 502
#define SFXsfx01F7 503
#define SFXsfx01F8 504
#define SFXsfx01F9 505
#define SFXsfx01FA 506
#define SFXsfx01FB 507


================================================
FILE: Runtime/Audio/SFX/IntroBoss.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: IntroBoss
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPIntroBoss 0

#define SFXsfx0000 0
#define SFXsfx0001 1
#define SFXsfx0002 2
#define SFXpaq_a_spit_lp_00 3
#define SFXpaq_b_squawk_00 4
#define SFXpaq_b_creak_00 5
#define SFXpaq_b_creak_01 6
#define SFXpaq_b_growl_00 7
#define SFXpaq_b_growl_01 8
#define SFXpaq_b_land_00 9
#define SFXpaq_b_roar_00 10
#define SFXpaq_b_roar_01 11
#define SFXsfx000C 12
#define SFXpaq_b_walk_00 13
#define SFXpaq_b_walk_01 14
#define SFXpaq_r_impact_00 15
#define SFXpaq_r_impact_01 16
#define SFXpaq_r_ldeath_00 17
#define SFXpaq_r_sdeath_01 18
#define SFXpaq_b_swish_00 19
#define SFXsfx0014 20
#define SFXsfx0015 21
#define SFXsfx0016 22
#define SFXpaq_b_land_01 23
#define SFXpaq_b_run_00 24
#define SFXpaq_b_run_01 25
#define SFXsfx001A 26
#define SFXsfx001B 27
#define SFXsfx001C 28
#define SFXsfx001D 29
#define SFXsfx001E 30
#define SFXsfx001F 31
#define SFXsfx0020 32
#define SFXsfx0021 33
#define SFXsfx0022 34
#define SFXsfx0023 35
#define SFXsfx0024 36
#define SFXsfx0025 37
#define SFXsfx0026 38
#define SFXsfx0027 39
#define SFXsfx0028 40
#define SFXsfx0029 41


================================================
FILE: Runtime/Audio/SFX/IntroWorld.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: IntroWorld
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPIntroWorld 46

#define SFXsfx07FA 2042
#define SFXsfx07FB 2043
#define SFXsfx07FC 2044
#define SFXsfx07FD 2045
#define SFXsfx07FE 2046
#define SFXint_c_suitsprk_lp_01 2047
#define SFXsfx0800 2048
#define SFXsfx0801 2049
#define SFXsfx0802 2050
#define SFXsfx0803 2051
#define SFXsfx0804 2052
#define SFXsfx0805 2053
#define SFXsfx0806 2054
#define SFXsfx0807 2055
#define SFXsfx0808 2056
#define SFXsfx0809 2057
#define SFXsfx080A 2058
#define SFXsfx080B 2059
#define SFXsfx080C 2060
#define SFXsfx080D 2061
#define SFXsfx080E 2062
#define SFXsfx080F 2063
#define SFXsfx0810 2064
#define SFXsfx0811 2065
#define SFXsfx0812 2066
#define SFXsfx0813 2067
#define SFXsfx0814 2068
#define SFXsfx0815 2069
#define SFXsfx0816 2070
#define SFXsfx0817 2071
#define SFXsfx0818 2072
#define SFXsfx0819 2073
#define SFXsfx081A 2074
#define SFXsfx081B 2075
#define SFXsfx081C 2076
#define SFXsfx081D 2077
#define SFXsfx081E 2078
#define SFXsfx081F 2079
#define SFXsfx0820 2080
#define SFXsfx0821 2081
#define SFXsfx0822 2082
#define SFXsfx0823 2083
#define SFXsfx0824 2084
#define SFXsfx0825 2085
#define SFXsfx0826 2086
#define SFXsfx0827 2087
#define SFXsfx0828 2088
#define SFXsfx0829 2089
#define SFXsfx082A 2090
#define SFXsfx082B 2091
#define SFXsfx082C 2092
#define SFXsfx082D 2093
#define SFXsfx082E 2094
#define SFXsfx082F 2095
#define SFXsfx0830 2096
#define SFXsfx0831 2097
#define SFXsfx0832 2098
#define SFXsfx0833 2099
#define SFXsfx0834 2100
#define SFXsfx0835 2101
#define SFXsfx0836 2102
#define SFXsfx0837 2103
#define SFXsfx0838 2104
#define SFXsfx0839 2105
#define SFXsfx083A 2106
#define SFXsfx083B 2107
#define SFXsfx083C 2108
#define SFXint_x_frtdoor_00 2109
#define SFXint_x_frtdoor_01 2110
#define SFXsfx083F 2111
#define SFXsfx0840 2112
#define SFXsfx0841 2113
#define SFXsfx0842 2114
#define SFXsfx0843 2115
#define SFXsfx0844 2116
#define SFXsfx0845 2117
#define SFXsfx0846 2118
#define SFXsfx0847 2119
#define SFXsfx0848 2120
#define SFXsfx0849 2121
#define SFXsfx084A 2122
#define SFXsfx084B 2123
#define SFXsfx084C 2124
#define SFXsfx084D 2125
#define SFXint_c_suitbrst_01 2126
#define SFXsfx084F 2127
#define SFXsfx0850 2128
#define SFXsfx0851 2129
#define SFXint_c_shipthst_00 2130
#define SFXsfx0853 2131
#define SFXsfx0854 2132
#define SFXsfx0855 2133
#define SFXsfx0856 2134
#define SFXsfx0857 2135
#define SFXsfx0858 2136
#define SFXsfx0859 2137
#define SFXsfx085A 2138
#define SFXsfx085B 2139
#define SFXsfx085C 2140
#define SFXsfx085D 2141
#define SFXsfx085E 2142
#define SFXsfx085F 2143
#define SFXsfx0860 2144
#define SFXsfx0861 2145
#define SFXsfx0862 2146
#define SFXsfx0863 2147
#define SFXsfx0864 2148
#define SFXsfx0865 2149
#define SFXsfx0866 2150
#define SFXsfx0867 2151
#define SFXsfx0868 2152
#define SFXsfx0869 2153
#define SFXsfx086A 2154
#define SFXsfx086B 2155
#define SFXsfx086C 2156
#define SFXsfx086D 2157
#define SFXsfx086E 2158
#define SFXsfx086F 2159
#define SFXsfx0870 2160
#define SFXint_x_clampstp_00 2161
#define SFXint_x_clamp_00 2162
#define SFXint_x_clamp_01 2163
#define SFXsfx0874 2164
#define SFXsfx0875 2165
#define SFXsfx0876 2166
#define SFXsfx0877 2167
#define SFXsfx0878 2168
#define SFXsfx0879 2169
#define SFXsfx087A 2170
#define SFXsfx087B 2171
#define SFXsfx087C 2172
#define SFXsfx087D 2173
#define SFXsfx087E 2174
#define SFXsfx087F 2175
#define SFXsfx0880 2176
#define SFXsfx0881 2177
#define SFXsfx0882 2178
#define SFXsfx0883 2179
#define SFXsfx0884 2180


================================================
FILE: Runtime/Audio/SFX/JellyZap.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: JellyZap
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPJellyZap 18

#define SFXjzp_a_shock_00 508
#define SFXjzp_a_suck_lp_00 509
#define SFXjzp_b_bubbles_00 510
#define SFXjzp_b_growl_00 511
#define SFXsfx0200 512
#define SFXsfx0201 513
#define SFXsfx0202 514
#define SFXsfx0203 515
#define SFXsfx0204 516
#define SFXsfx0205 517


================================================
FILE: Runtime/Audio/SFX/LavaWorld.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: LavaWorld
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPLavaWorld 47

#define SFXsfx0885 2181
#define SFXsfx0886 2182
#define SFXlav_wlklava_00 2183
#define SFXlav_wlklava_01 2184
#define SFXsfx0889 2185
#define SFXlav_ballroll_lava 2186
#define SFXsfx088B 2187
#define SFXsfx088C 2188
#define SFXsfx088D 2189
#define SFXlav_landlava_00 2190
#define SFXsfx088F 2191
#define SFXsfx0890 2192
#define SFXsfx0891 2193
#define SFXsfx0892 2194
#define SFXsfx0893 2195
#define SFXsfx0894 2196
#define SFXsfx0895 2197
#define SFXsfx0896 2198
#define SFXsfx0897 2199
#define SFXsfx0898 2200
#define SFXsfx0899 2201
#define SFXsfx089A 2202
#define SFXsfx089B 2203
#define SFXsfx089C 2204
#define SFXsfx089D 2205
#define SFXsfx089E 2206
#define SFXsfx089F 2207
#define SFXsfx08A0 2208
#define SFXsfx08A1 2209
#define SFXsfx08A2 2210
#define SFXsfx08A3 2211
#define SFXsfx08A4 2212
#define SFXsfx08A5 2213
#define SFXsfx08A6 2214
#define SFXsfx08A7 2215
#define SFXlav_x_piston_lp_00 2216
#define SFXsfx08A9 2217
#define SFXlav_x_piststop_00 2218
#define SFXlav_x_piststop_01 2219
#define SFXsfx08AC 2220
#define SFXsfx08AD 2221
#define SFXswp_x_03bridgestop_00 2222
#define SFXsfx08AF 2223
#define SFXsfx08B0 2224
#define SFXsfx08B1 2225
#define SFXsfx08B2 2226
#define SFXsfx08B3 2227
#define SFXsfx08B4 2228
#define SFXsfx08B5 2229
#define SFXsfx08B6 2230
#define SFXsfx08B7 2231
#define SFXsfx08B8 2232
#define SFXsfx08B9 2233
#define SFXsfx08BA 2234
#define SFXsfx08BB 2235
#define SFXsfx08BC 2236
#define SFXsfx08BD 2237
#define SFXsfx08BE 2238
#define SFXmag_b_rise_00 2239
#define SFXsfx08C0 2240
#define SFXsfx08C1 2241
#define SFXsfx08C2 2242
#define SFXsfx08C3 2243
#define SFXsfx08C4 2244
#define SFXsfx08C5 2245
#define SFXsfx08C6 2246
#define SFXsfx08C7 2247
#define SFXsfx08C8 2248
#define SFXsfx08C9 2249
#define SFXsfx08CA 2250
#define SFXsfx08CB 2251
#define SFXsfx08CC 2252
#define SFXlav_x_gateup_lp_00 2253
#define SFXsfx08CE 2254
#define SFXlav_x_refrig_00 2255
#define SFXlav_x_gatestop_00 2256
#define SFXsfx08D1 2257
#define SFXsfx08D2 2258
#define SFXsfx08D3 2259
#define SFXsfx08D4 2260
#define SFXsfx08D5 2261
#define SFXsfx08D6 2262
#define SFXlav_landlava_02 2263
#define SFXsfx08D8 2264
#define SFXsfx08D9 2265
#define SFXsfx08DA 2266
#define SFXsfx08DB 2267
#define SFXsfx08DC 2268
#define SFXsfx08DD 2269
#define SFXsfx08DE 2270
#define SFXsfx08DF 2271
#define SFXsfx08E0 2272
#define SFXsfx08E1 2273
#define SFXsfx08E2 2274
#define SFXsfx08E3 2275
#define SFXsfx08E4 2276
#define SFXsfx08E5 2277
#define SFXsfx08E6 2278
#define SFXsfx08E7 2279
#define SFXsfx08E8 2280
#define SFXsfx08E9 2281
#define SFXsfx08EA 2282
#define SFXsfx08EB 2283


================================================
FILE: Runtime/Audio/SFX/Magdolite.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Magdolite
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPMagdolite 19

#define SFXmag_b_alert_00 518
#define SFXmag_b_idle_00 519
#define SFXsfx0208 520
#define SFXmag_r_pain_00 521
#define SFXmag_a_bite_00 522
#define SFXmag_r_death_00 523
#define SFXmag_a_breath_00 524
#define SFXmag_a_flame_lp_00 525
#define SFXmag_r_yelp_00 526
#define SFXsfx020F 527
#define SFXsfx0210 528
#define SFXsfx0211 529
#define SFXsfx0212 530
#define SFXsfx0213 531
#define SFXsfx0214 532
#define SFXsfx0215 533
#define SFXsfx0216 534
#define SFXsfx0217 535
#define SFXsfx0218 536
#define SFXsfx0219 537
#define SFXsfx021A 538
#define SFXsfx021B 539
#define SFXsfx021C 540
#define SFXsfx021D 541
#define SFXsfx021E 542
#define SFXsfx021F 543
#define SFXsfx0220 544
#define SFXsfx0221 545
#define SFXsfx0222 546
#define SFXsfx0223 547


================================================
FILE: Runtime/Audio/SFX/Metaree.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Metaree
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPMetaree 20

#define SFXmtr_a_scream_00 548
#define SFXsfx0225 549
#define SFXmtr_b_spin_lp_06 550
#define SFXmtr_b_spin_lp_07 551
#define SFXsfx0228 552
#define SFXsfx0229 553
#define SFXsfx022A 554
#define SFXsfx022B 555
#define SFXsfx022C 556
#define SFXsfx022D 557
#define SFXsfx022E 558


================================================
FILE: Runtime/Audio/SFX/Metroid.h
================================================
/* Auto-generated Amuse Defines
 *
 * Project: Audio
 * Subproject: Metroid
 * Date: Sat Sep  1 12:32:04 2018
 */

#define GRPMetroid 21

#define SFXsfx022F 559
#define SFXsfx0230 560
#define SFXmtd_a_facehug_02 561
#define SFXmtd_a_swoosh_00 562
#define SFXmtd_a_swoosh_01 563
#define SFXmtd_a_thunk_00 564
#define SFXmtd_b_fadein_00 565
#define SFXmtd_b_fadeout_00 566
#define SFXmtd_b_float_lp_00 567
#define SFXmtd_b_float_lp_01 568
#define SFXmtd_b_idle_00 569
#define SFXmtd_b_idle_01 570
#define SFXsfx023B 571
#define SFXsfx023C 572
#define SFXsfx023D 573
#define SFXsfx023E 574
#define SFXsfx023F 575
#define SFXmtd_b_squish_00 576
#define SFXmtd_b_squish_01 577
#define SFXsfx0242 578
#define SFXmtd_b_voxangry_00 579
#define SFXsfx0244 580
#define SFXsfx0245 581
#define SFXmtd_r_impact_00 582
#define SFXsfx0247 583
#define SFXsfx0248 584
#define SFXmt2_a_facehug_02 585
#define SFXsfx024A 586
#define SFXsfx024B 587
#define SFXsfx024C 588
#define SFXsfx024D 589
#define SFXmt2_b_float_lp_00 590
#define SFXmt2_b_float_lp_01 591
#define SFXsfx0250 592
#define SFXsfx0251 593
#define SFXsfx0252 594
#define SFXmt2_b_idle_02 595
#define SFXsfx0254 596
#define SFXsfx0255 597
#define
Download .txt
gitextract_10668kcv/

├── .clang-format
├── .clang-tidy
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── CMakePresets.json
├── LICENSE
├── NESEmulator/
│   ├── CMakeLists.txt
│   ├── CNESEmulator.cpp
│   ├── CNESEmulator.hpp
│   ├── apu.c
│   ├── malloc.h
│   └── ppu.c
├── README.md
├── Runtime/
│   ├── Audio/
│   │   ├── CAudioGroupSet.cpp
│   │   ├── CAudioGroupSet.hpp
│   │   ├── CAudioSys.cpp
│   │   ├── CAudioSys.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMidiManager.cpp
│   │   ├── CMidiManager.hpp
│   │   ├── CSfxManager.cpp
│   │   ├── CSfxManager.hpp
│   │   ├── CStaticAudioPlayer.cpp
│   │   ├── CStaticAudioPlayer.hpp
│   │   ├── CStreamAudioManager.cpp
│   │   ├── CStreamAudioManager.hpp
│   │   ├── SFX/
│   │   │   ├── Atomic.h
│   │   │   ├── BetaBeetle.h
│   │   │   ├── Bird.h
│   │   │   ├── BloodFlower.h
│   │   │   ├── Burrower.h
│   │   │   ├── ChozoGhost.h
│   │   │   ├── ChubbWeed.h
│   │   │   ├── CineBoots.h
│   │   │   ├── CineGeneral.h
│   │   │   ├── CineGun.h
│   │   │   ├── CineMorphball.h
│   │   │   ├── CineSuit.h
│   │   │   ├── CineVisor.h
│   │   │   ├── Crater.h
│   │   │   ├── Crystallite.h
│   │   │   ├── Drones.h
│   │   │   ├── EliteSpacePirate.h
│   │   │   ├── FireFlea.h
│   │   │   ├── Flaaghra.h
│   │   │   ├── FlickerBat.h
│   │   │   ├── FlyingPirate.h
│   │   │   ├── FrontEnd.h
│   │   │   ├── GagantuanBeatle.h
│   │   │   ├── Gnats.h
│   │   │   ├── Gryzbee.h
│   │   │   ├── IceCrack.h
│   │   │   ├── IceWorld.h
│   │   │   ├── InjuredPirates.h
│   │   │   ├── IntroBoss.h
│   │   │   ├── IntroWorld.h
│   │   │   ├── JellyZap.h
│   │   │   ├── LavaWorld.h
│   │   │   ├── Magdolite.h
│   │   │   ├── Metaree.h
│   │   │   ├── Metroid.h
│   │   │   ├── MetroidPrime.h
│   │   │   ├── MinesWorld.h
│   │   │   ├── Misc.h
│   │   │   ├── MiscSamus.h
│   │   │   ├── OmegaPirate.h
│   │   │   ├── OverWorld.h
│   │   │   ├── Parasite.h
│   │   │   ├── Phazon.h
│   │   │   ├── PhazonGun.h
│   │   │   ├── PuddleSpore.h
│   │   │   ├── PuddleToad.h
│   │   │   ├── Puffer.h
│   │   │   ├── ReactorDoor.h
│   │   │   ├── Ridley.h
│   │   │   ├── Ripper.h
│   │   │   ├── RuinsWorld.h
│   │   │   ├── SFX.h
│   │   │   ├── SamusShip.h
│   │   │   ├── Scarab.h
│   │   │   ├── Seedling.h
│   │   │   ├── SheeGoth.h
│   │   │   ├── SnakeWeed.h
│   │   │   ├── Sova.h
│   │   │   ├── SpacePirate.h
│   │   │   ├── SpankWeed.h
│   │   │   ├── Thardus.h
│   │   │   ├── TheEnd.h
│   │   │   ├── Torobyte.h
│   │   │   ├── Triclops.h
│   │   │   ├── Turret.h
│   │   │   ├── UI.h
│   │   │   ├── WarWasp.h
│   │   │   ├── Weapons.h
│   │   │   ├── ZZZ.h
│   │   │   ├── Zoomer.h
│   │   │   ├── lumigek.h
│   │   │   └── test.h
│   │   ├── g721.c
│   │   └── g721.h
│   ├── AutoMapper/
│   │   ├── CAutoMapper.cpp
│   │   ├── CAutoMapper.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMapArea.cpp
│   │   ├── CMapArea.hpp
│   │   ├── CMapUniverse.cpp
│   │   ├── CMapUniverse.hpp
│   │   ├── CMapWorld.cpp
│   │   ├── CMapWorld.hpp
│   │   ├── CMapWorldInfo.cpp
│   │   ├── CMapWorldInfo.hpp
│   │   ├── CMappableObject.cpp
│   │   └── CMappableObject.hpp
│   ├── CArchitectureMessage.hpp
│   ├── CArchitectureQueue.hpp
│   ├── CBasics.hpp
│   ├── CBasicsPC.cpp
│   ├── CCRC32.cpp
│   ├── CCRC32.hpp
│   ├── CDependencyGroup.cpp
│   ├── CDependencyGroup.hpp
│   ├── CDvdFile.cpp
│   ├── CDvdFile.hpp
│   ├── CDvdRequest.hpp
│   ├── CFactoryMgr.cpp
│   ├── CFactoryMgr.hpp
│   ├── CGameAllocator.cpp
│   ├── CGameAllocator.hpp
│   ├── CGameDebug.hpp
│   ├── CGameHintInfo.cpp
│   ├── CGameHintInfo.hpp
│   ├── CGameOptions.cpp
│   ├── CGameOptions.hpp
│   ├── CGameState.cpp
│   ├── CGameState.hpp
│   ├── CIOWin.hpp
│   ├── CIOWinManager.cpp
│   ├── CIOWinManager.hpp
│   ├── CInGameTweakManagerBase.hpp
│   ├── CInfiniteLoopDetector.cpp
│   ├── CInfiniteLoopDetector.hpp
│   ├── CMFGameBase.hpp
│   ├── CMain.cpp
│   ├── CMainFlowBase.cpp
│   ├── CMainFlowBase.hpp
│   ├── CMakeLists.txt
│   ├── CMayaSpline.cpp
│   ├── CMayaSpline.hpp
│   ├── CMemoryCardSys.cpp
│   ├── CMemoryCardSys.hpp
│   ├── CMemoryCardSysNix.cpp
│   ├── CMemoryCardSysOSX.cpp
│   ├── CMemoryCardSysWin.cpp
│   ├── CObjectList.cpp
│   ├── CObjectList.hpp
│   ├── CPakFile.cpp
│   ├── CPakFile.hpp
│   ├── CPlayerState.cpp
│   ├── CPlayerState.hpp
│   ├── CRandom16.cpp
│   ├── CRandom16.hpp
│   ├── CResFactory.cpp
│   ├── CResFactory.hpp
│   ├── CResLoader.cpp
│   ├── CResLoader.hpp
│   ├── CResourceNameDatabase.cpp
│   ├── CResourceNameDatabase.hpp
│   ├── CScannableObjectInfo.cpp
│   ├── CScannableObjectInfo.hpp
│   ├── CScriptMailbox.cpp
│   ├── CScriptMailbox.hpp
│   ├── CSimplePool.cpp
│   ├── CSimplePool.hpp
│   ├── CSortedLists.cpp
│   ├── CSortedLists.hpp
│   ├── CStateManager.cpp
│   ├── CStateManager.hpp
│   ├── CStaticInterference.cpp
│   ├── CStaticInterference.hpp
│   ├── CStopwatch.cpp
│   ├── CStopwatch.hpp
│   ├── CStringExtras.cpp
│   ├── CStringExtras.hpp
│   ├── CTextureCache.cpp
│   ├── CTextureCache.hpp
│   ├── CTimeProvider.cpp
│   ├── CTimeProvider.hpp
│   ├── CToken.cpp
│   ├── CToken.hpp
│   ├── CWorldSaveGameInfo.cpp
│   ├── CWorldSaveGameInfo.hpp
│   ├── Camera/
│   │   ├── CBallCamera.cpp
│   │   ├── CBallCamera.hpp
│   │   ├── CCameraFilter.cpp
│   │   ├── CCameraFilter.hpp
│   │   ├── CCameraManager.cpp
│   │   ├── CCameraManager.hpp
│   │   ├── CCameraShakeData.cpp
│   │   ├── CCameraShakeData.hpp
│   │   ├── CCameraSpline.cpp
│   │   ├── CCameraSpline.hpp
│   │   ├── CCinematicCamera.cpp
│   │   ├── CCinematicCamera.hpp
│   │   ├── CFirstPersonCamera.cpp
│   │   ├── CFirstPersonCamera.hpp
│   │   ├── CGameCamera.cpp
│   │   ├── CGameCamera.hpp
│   │   ├── CInterpolationCamera.cpp
│   │   ├── CInterpolationCamera.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CPathCamera.cpp
│   │   └── CPathCamera.hpp
│   ├── Character/
│   │   ├── CActorLights.cpp
│   │   ├── CActorLights.hpp
│   │   ├── CAdditiveAnimPlayback.cpp
│   │   ├── CAdditiveAnimPlayback.hpp
│   │   ├── CAdditiveBodyState.cpp
│   │   ├── CAdditiveBodyState.hpp
│   │   ├── CAllFormatsAnimSource.cpp
│   │   ├── CAllFormatsAnimSource.hpp
│   │   ├── CAnimCharacterSet.cpp
│   │   ├── CAnimCharacterSet.hpp
│   │   ├── CAnimData.cpp
│   │   ├── CAnimData.hpp
│   │   ├── CAnimPOIData.cpp
│   │   ├── CAnimPOIData.hpp
│   │   ├── CAnimPerSegmentData.hpp
│   │   ├── CAnimPlaybackParms.hpp
│   │   ├── CAnimSource.cpp
│   │   ├── CAnimSource.hpp
│   │   ├── CAnimSourceReader.cpp
│   │   ├── CAnimSourceReader.hpp
│   │   ├── CAnimSysContext.hpp
│   │   ├── CAnimTreeAnimReaderContainer.cpp
│   │   ├── CAnimTreeAnimReaderContainer.hpp
│   │   ├── CAnimTreeBlend.cpp
│   │   ├── CAnimTreeBlend.hpp
│   │   ├── CAnimTreeDoubleChild.cpp
│   │   ├── CAnimTreeDoubleChild.hpp
│   │   ├── CAnimTreeLoopIn.cpp
│   │   ├── CAnimTreeLoopIn.hpp
│   │   ├── CAnimTreeNode.cpp
│   │   ├── CAnimTreeNode.hpp
│   │   ├── CAnimTreeSequence.cpp
│   │   ├── CAnimTreeSequence.hpp
│   │   ├── CAnimTreeSingleChild.cpp
│   │   ├── CAnimTreeSingleChild.hpp
│   │   ├── CAnimTreeTimeScale.cpp
│   │   ├── CAnimTreeTimeScale.hpp
│   │   ├── CAnimTreeTransition.cpp
│   │   ├── CAnimTreeTransition.hpp
│   │   ├── CAnimTreeTweenBase.cpp
│   │   ├── CAnimTreeTweenBase.hpp
│   │   ├── CAnimation.cpp
│   │   ├── CAnimation.hpp
│   │   ├── CAnimationDatabase.hpp
│   │   ├── CAnimationDatabaseGame.cpp
│   │   ├── CAnimationDatabaseGame.hpp
│   │   ├── CAnimationManager.cpp
│   │   ├── CAnimationManager.hpp
│   │   ├── CAnimationSet.cpp
│   │   ├── CAnimationSet.hpp
│   │   ├── CAssetFactory.cpp
│   │   ├── CAssetFactory.hpp
│   │   ├── CBodyController.cpp
│   │   ├── CBodyController.hpp
│   │   ├── CBodyState.cpp
│   │   ├── CBodyState.hpp
│   │   ├── CBodyStateCmdMgr.cpp
│   │   ├── CBodyStateCmdMgr.hpp
│   │   ├── CBodyStateInfo.cpp
│   │   ├── CBodyStateInfo.hpp
│   │   ├── CBoneTracking.cpp
│   │   ├── CBoneTracking.hpp
│   │   ├── CBoolPOINode.cpp
│   │   ├── CBoolPOINode.hpp
│   │   ├── CCharAnimTime.cpp
│   │   ├── CCharAnimTime.hpp
│   │   ├── CCharLayoutInfo.cpp
│   │   ├── CCharLayoutInfo.hpp
│   │   ├── CCharacterFactory.cpp
│   │   ├── CCharacterFactory.hpp
│   │   ├── CCharacterInfo.cpp
│   │   ├── CCharacterInfo.hpp
│   │   ├── CCharacterSet.cpp
│   │   ├── CCharacterSet.hpp
│   │   ├── CEffectComponent.cpp
│   │   ├── CEffectComponent.hpp
│   │   ├── CFBStreamedAnimReader.cpp
│   │   ├── CFBStreamedAnimReader.hpp
│   │   ├── CFBStreamedCompression.cpp
│   │   ├── CFBStreamedCompression.hpp
│   │   ├── CGroundMovement.cpp
│   │   ├── CGroundMovement.hpp
│   │   ├── CHalfTransition.cpp
│   │   ├── CHalfTransition.hpp
│   │   ├── CHierarchyPoseBuilder.cpp
│   │   ├── CHierarchyPoseBuilder.hpp
│   │   ├── CIkChain.cpp
│   │   ├── CIkChain.hpp
│   │   ├── CInt32POINode.cpp
│   │   ├── CInt32POINode.hpp
│   │   ├── CLayoutDescription.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMetaAnimBlend.cpp
│   │   ├── CMetaAnimBlend.hpp
│   │   ├── CMetaAnimFactory.cpp
│   │   ├── CMetaAnimFactory.hpp
│   │   ├── CMetaAnimPhaseBlend.cpp
│   │   ├── CMetaAnimPhaseBlend.hpp
│   │   ├── CMetaAnimPlay.cpp
│   │   ├── CMetaAnimPlay.hpp
│   │   ├── CMetaAnimRandom.cpp
│   │   ├── CMetaAnimRandom.hpp
│   │   ├── CMetaAnimSequence.cpp
│   │   ├── CMetaAnimSequence.hpp
│   │   ├── CMetaTransFactory.cpp
│   │   ├── CMetaTransFactory.hpp
│   │   ├── CMetaTransMetaAnim.cpp
│   │   ├── CMetaTransMetaAnim.hpp
│   │   ├── CMetaTransPhaseTrans.cpp
│   │   ├── CMetaTransPhaseTrans.hpp
│   │   ├── CMetaTransSnap.cpp
│   │   ├── CMetaTransSnap.hpp
│   │   ├── CMetaTransTrans.cpp
│   │   ├── CMetaTransTrans.hpp
│   │   ├── CModelData.cpp
│   │   ├── CModelData.hpp
│   │   ├── CPASAnimInfo.cpp
│   │   ├── CPASAnimInfo.hpp
│   │   ├── CPASAnimParm.hpp
│   │   ├── CPASAnimParmData.cpp
│   │   ├── CPASAnimParmData.hpp
│   │   ├── CPASAnimState.cpp
│   │   ├── CPASAnimState.hpp
│   │   ├── CPASDatabase.cpp
│   │   ├── CPASDatabase.hpp
│   │   ├── CPASParmInfo.cpp
│   │   ├── CPASParmInfo.hpp
│   │   ├── CPOINode.cpp
│   │   ├── CPOINode.hpp
│   │   ├── CParticleData.cpp
│   │   ├── CParticleData.hpp
│   │   ├── CParticleDatabase.cpp
│   │   ├── CParticleDatabase.hpp
│   │   ├── CParticleGenInfo.cpp
│   │   ├── CParticleGenInfo.hpp
│   │   ├── CParticlePOINode.cpp
│   │   ├── CParticlePOINode.hpp
│   │   ├── CPoseAsTransforms.cpp
│   │   ├── CPoseAsTransforms.hpp
│   │   ├── CPrimitive.cpp
│   │   ├── CPrimitive.hpp
│   │   ├── CRagDoll.cpp
│   │   ├── CRagDoll.hpp
│   │   ├── CSegId.hpp
│   │   ├── CSegIdList.cpp
│   │   ├── CSegIdList.hpp
│   │   ├── CSegStatementSet.cpp
│   │   ├── CSegStatementSet.hpp
│   │   ├── CSequenceHelper.cpp
│   │   ├── CSequenceHelper.hpp
│   │   ├── CSkinRules.cpp
│   │   ├── CSkinRules.hpp
│   │   ├── CSoundPOINode.cpp
│   │   ├── CSoundPOINode.hpp
│   │   ├── CSteeringBehaviors.cpp
│   │   ├── CSteeringBehaviors.hpp
│   │   ├── CTimeScaleFunctions.cpp
│   │   ├── CTimeScaleFunctions.hpp
│   │   ├── CTransition.cpp
│   │   ├── CTransition.hpp
│   │   ├── CTransitionDatabase.hpp
│   │   ├── CTransitionDatabaseGame.cpp
│   │   ├── CTransitionDatabaseGame.hpp
│   │   ├── CTransitionManager.cpp
│   │   ├── CTransitionManager.hpp
│   │   ├── CTreeUtils.cpp
│   │   ├── CTreeUtils.hpp
│   │   ├── CharacterCommon.cpp
│   │   ├── CharacterCommon.hpp
│   │   ├── IAnimReader.cpp
│   │   ├── IAnimReader.hpp
│   │   ├── IMetaAnim.cpp
│   │   ├── IMetaAnim.hpp
│   │   ├── IMetaTrans.hpp
│   │   ├── IVaryingAnimationTimeScale.hpp
│   │   └── TSegIdMap.hpp
│   ├── Collision/
│   │   ├── CAABoxFilter.cpp
│   │   ├── CAABoxFilter.hpp
│   │   ├── CAreaOctTree.cpp
│   │   ├── CAreaOctTree.hpp
│   │   ├── CBallFilter.cpp
│   │   ├── CBallFilter.hpp
│   │   ├── CCollidableAABox.cpp
│   │   ├── CCollidableAABox.hpp
│   │   ├── CCollidableCollisionSurface.cpp
│   │   ├── CCollidableCollisionSurface.hpp
│   │   ├── CCollidableOBBTree.cpp
│   │   ├── CCollidableOBBTree.hpp
│   │   ├── CCollidableOBBTreeGroup.cpp
│   │   ├── CCollidableOBBTreeGroup.hpp
│   │   ├── CCollidableSphere.cpp
│   │   ├── CCollidableSphere.hpp
│   │   ├── CCollisionActor.cpp
│   │   ├── CCollisionActor.hpp
│   │   ├── CCollisionActorManager.cpp
│   │   ├── CCollisionActorManager.hpp
│   │   ├── CCollisionEdge.cpp
│   │   ├── CCollisionEdge.hpp
│   │   ├── CCollisionInfo.cpp
│   │   ├── CCollisionInfo.hpp
│   │   ├── CCollisionInfoList.hpp
│   │   ├── CCollisionPrimitive.cpp
│   │   ├── CCollisionPrimitive.hpp
│   │   ├── CCollisionResponseData.cpp
│   │   ├── CCollisionResponseData.hpp
│   │   ├── CCollisionSurface.cpp
│   │   ├── CCollisionSurface.hpp
│   │   ├── CGameCollision.cpp
│   │   ├── CGameCollision.hpp
│   │   ├── CInternalRayCastStructure.hpp
│   │   ├── CJointCollisionDescription.cpp
│   │   ├── CJointCollisionDescription.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMaterialFilter.cpp
│   │   ├── CMaterialFilter.hpp
│   │   ├── CMaterialList.hpp
│   │   ├── CMetroidAreaCollider.cpp
│   │   ├── CMetroidAreaCollider.hpp
│   │   ├── COBBTree.cpp
│   │   ├── COBBTree.hpp
│   │   ├── CRayCastResult.cpp
│   │   ├── CRayCastResult.hpp
│   │   ├── CollisionUtil.cpp
│   │   ├── CollisionUtil.hpp
│   │   ├── ICollisionFilter.hpp
│   │   ├── InternalColliders.cpp
│   │   └── InternalColliders.hpp
│   ├── ConsoleVariables/
│   │   ├── CVar.cpp
│   │   ├── CVar.hpp
│   │   ├── CVarCommons.cpp
│   │   ├── CVarCommons.hpp
│   │   ├── CVarManager.cpp
│   │   ├── CVarManager.hpp
│   │   ├── FileStoreManager.cpp
│   │   └── FileStoreManager.hpp
│   ├── Flags.hpp
│   ├── Formatting.hpp
│   ├── GCNTypes.hpp
│   ├── GameGlobalObjects.cpp
│   ├── GameGlobalObjects.hpp
│   ├── GameObjectLists.cpp
│   ├── GameObjectLists.hpp
│   ├── Graphics/
│   │   ├── CCubeMaterial.cpp
│   │   ├── CCubeMaterial.hpp
│   │   ├── CCubeModel.cpp
│   │   ├── CCubeModel.hpp
│   │   ├── CCubeRenderer.cpp
│   │   ├── CCubeRenderer.hpp
│   │   ├── CCubeSurface.cpp
│   │   ├── CCubeSurface.hpp
│   │   ├── CDrawable.hpp
│   │   ├── CDrawablePlaneObject.hpp
│   │   ├── CFont.cpp
│   │   ├── CFont.hpp
│   │   ├── CGX.cpp
│   │   ├── CGX.hpp
│   │   ├── CGraphics.cpp
│   │   ├── CGraphics.hpp
│   │   ├── CGraphicsPalette.cpp
│   │   ├── CGraphicsPalette.hpp
│   │   ├── CLight.cpp
│   │   ├── CLight.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMetroidModelInstance.cpp
│   │   ├── CMetroidModelInstance.hpp
│   │   ├── CModel.cpp
│   │   ├── CModel.hpp
│   │   ├── CMoviePlayer.cpp
│   │   ├── CMoviePlayer.hpp
│   │   ├── CPVSAreaSet.cpp
│   │   ├── CPVSAreaSet.hpp
│   │   ├── CPVSVisOctree.cpp
│   │   ├── CPVSVisOctree.hpp
│   │   ├── CPVSVisSet.cpp
│   │   ├── CPVSVisSet.hpp
│   │   ├── CRainSplashGenerator.cpp
│   │   ├── CRainSplashGenerator.hpp
│   │   ├── CSimpleShadow.cpp
│   │   ├── CSimpleShadow.hpp
│   │   ├── CSkinnedModel.cpp
│   │   ├── CSkinnedModel.hpp
│   │   ├── CTevCombiners.cpp
│   │   ├── CTevCombiners.hpp
│   │   ├── CTexture.cpp
│   │   ├── CTexture.hpp
│   │   ├── CVertexMorphEffect.cpp
│   │   ├── CVertexMorphEffect.hpp
│   │   ├── GX.hpp
│   │   ├── IRenderer.hpp
│   │   ├── IWeaponRenderer.cpp
│   │   └── IWeaponRenderer.hpp
│   ├── GuiSys/
│   │   ├── CAuiEnergyBarT01.cpp
│   │   ├── CAuiEnergyBarT01.hpp
│   │   ├── CAuiImagePane.cpp
│   │   ├── CAuiImagePane.hpp
│   │   ├── CAuiMeter.cpp
│   │   ├── CAuiMeter.hpp
│   │   ├── CCompoundTargetReticle.cpp
│   │   ├── CCompoundTargetReticle.hpp
│   │   ├── CConsoleOutputWindow.cpp
│   │   ├── CConsoleOutputWindow.hpp
│   │   ├── CDrawStringOptions.hpp
│   │   ├── CErrorOutputWindow.cpp
│   │   ├── CErrorOutputWindow.hpp
│   │   ├── CFontImageDef.cpp
│   │   ├── CFontImageDef.hpp
│   │   ├── CFontRenderState.cpp
│   │   ├── CFontRenderState.hpp
│   │   ├── CGuiCamera.cpp
│   │   ├── CGuiCamera.hpp
│   │   ├── CGuiCompoundWidget.cpp
│   │   ├── CGuiCompoundWidget.hpp
│   │   ├── CGuiFrame.cpp
│   │   ├── CGuiFrame.hpp
│   │   ├── CGuiGroup.cpp
│   │   ├── CGuiGroup.hpp
│   │   ├── CGuiHeadWidget.cpp
│   │   ├── CGuiHeadWidget.hpp
│   │   ├── CGuiLight.cpp
│   │   ├── CGuiLight.hpp
│   │   ├── CGuiModel.cpp
│   │   ├── CGuiModel.hpp
│   │   ├── CGuiObject.cpp
│   │   ├── CGuiObject.hpp
│   │   ├── CGuiPane.cpp
│   │   ├── CGuiPane.hpp
│   │   ├── CGuiSliderGroup.cpp
│   │   ├── CGuiSliderGroup.hpp
│   │   ├── CGuiSys.cpp
│   │   ├── CGuiSys.hpp
│   │   ├── CGuiTableGroup.cpp
│   │   ├── CGuiTableGroup.hpp
│   │   ├── CGuiTextPane.cpp
│   │   ├── CGuiTextPane.hpp
│   │   ├── CGuiTextSupport.cpp
│   │   ├── CGuiTextSupport.hpp
│   │   ├── CGuiWidget.cpp
│   │   ├── CGuiWidget.hpp
│   │   ├── CGuiWidgetDrawParms.hpp
│   │   ├── CGuiWidgetIdDB.cpp
│   │   ├── CGuiWidgetIdDB.hpp
│   │   ├── CHudBallInterface.cpp
│   │   ├── CHudBallInterface.hpp
│   │   ├── CHudBossEnergyInterface.cpp
│   │   ├── CHudBossEnergyInterface.hpp
│   │   ├── CHudDecoInterface.cpp
│   │   ├── CHudDecoInterface.hpp
│   │   ├── CHudEnergyInterface.cpp
│   │   ├── CHudEnergyInterface.hpp
│   │   ├── CHudFreeLookInterface.cpp
│   │   ├── CHudFreeLookInterface.hpp
│   │   ├── CHudHelmetInterface.cpp
│   │   ├── CHudHelmetInterface.hpp
│   │   ├── CHudInterface.hpp
│   │   ├── CHudMissileInterface.cpp
│   │   ├── CHudMissileInterface.hpp
│   │   ├── CHudRadarInterface.cpp
│   │   ├── CHudRadarInterface.hpp
│   │   ├── CHudThreatInterface.cpp
│   │   ├── CHudThreatInterface.hpp
│   │   ├── CHudVisorBeamMenu.cpp
│   │   ├── CHudVisorBeamMenu.hpp
│   │   ├── CInstruction.cpp
│   │   ├── CInstruction.hpp
│   │   ├── CMakeLists.txt
│   │   ├── COrbitPointMarker.cpp
│   │   ├── COrbitPointMarker.hpp
│   │   ├── CRasterFont.cpp
│   │   ├── CRasterFont.hpp
│   │   ├── CSaveableState.cpp
│   │   ├── CSaveableState.hpp
│   │   ├── CScanDisplay.cpp
│   │   ├── CScanDisplay.hpp
│   │   ├── CSplashScreen.cpp
│   │   ├── CSplashScreen.hpp
│   │   ├── CStringTable.cpp
│   │   ├── CStringTable.hpp
│   │   ├── CTargetingManager.cpp
│   │   ├── CTargetingManager.hpp
│   │   ├── CTextExecuteBuffer.cpp
│   │   ├── CTextExecuteBuffer.hpp
│   │   ├── CTextParser.cpp
│   │   ├── CTextParser.hpp
│   │   ├── CTextRenderBuffer.cpp
│   │   ├── CTextRenderBuffer.hpp
│   │   ├── CWordBreakTables.cpp
│   │   └── CWordBreakTables.hpp
│   ├── IFactory.hpp
│   ├── IMain.hpp
│   ├── IObj.hpp
│   ├── IObjFactory.hpp
│   ├── IObjectStore.hpp
│   ├── IRuntimeMain.hpp
│   ├── IVParamObj.hpp
│   ├── ImGuiConsole.cpp
│   ├── ImGuiConsole.hpp
│   ├── ImGuiControllerConfig.cpp
│   ├── ImGuiControllerConfig.hpp
│   ├── ImGuiEntitySupport.cpp
│   ├── ImGuiEntitySupport.hpp
│   ├── ImGuiPlayerLoadouts.cpp
│   ├── ImGuiPlayerLoadouts.hpp
│   ├── Input/
│   │   ├── CControllerAxis.hpp
│   │   ├── CControllerButton.hpp
│   │   ├── CControllerGamepadData.cpp
│   │   ├── CControllerGamepadData.hpp
│   │   ├── CDolphinController.cpp
│   │   ├── CDolphinController.hpp
│   │   ├── CFinalInput.cpp
│   │   ├── CFinalInput.hpp
│   │   ├── CInputGenerator.cpp
│   │   ├── CInputGenerator.cpp.old
│   │   ├── CInputGenerator.hpp
│   │   ├── CInputGenerator.hpp.old
│   │   ├── CKeyboardMouseController.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CRumbleGenerator.cpp
│   │   ├── CRumbleGenerator.hpp
│   │   ├── CRumbleManager.cpp
│   │   ├── CRumbleManager.hpp
│   │   ├── CRumbleVoice.cpp
│   │   ├── CRumbleVoice.hpp
│   │   ├── ControlMapper.cpp
│   │   ├── ControlMapper.hpp
│   │   ├── DolphinIController.cpp
│   │   ├── IController.hpp
│   │   ├── InputTypes.hpp
│   │   ├── RumbleFxTable.cpp
│   │   └── RumbleFxTable.hpp
│   ├── Logging.hpp
│   ├── MP1/
│   │   ├── CArtifactDoll.cpp
│   │   ├── CArtifactDoll.hpp
│   │   ├── CAudioStateWin.cpp
│   │   ├── CAudioStateWin.hpp
│   │   ├── CAutoSave.cpp
│   │   ├── CAutoSave.hpp
│   │   ├── CCredits.cpp
│   │   ├── CCredits.hpp
│   │   ├── CFaceplateDecoration.cpp
│   │   ├── CFaceplateDecoration.hpp
│   │   ├── CFrontEndUI.cpp
│   │   ├── CFrontEndUI.hpp
│   │   ├── CGBASupport.cpp
│   │   ├── CGBASupport.hpp
│   │   ├── CGameCubeDoll.cpp
│   │   ├── CGameCubeDoll.hpp
│   │   ├── CInGameGuiManager.cpp
│   │   ├── CInGameGuiManager.hpp
│   │   ├── CInGameGuiManagerCommon.hpp
│   │   ├── CInGameTweakManager.hpp
│   │   ├── CInventoryScreen.cpp
│   │   ├── CInventoryScreen.hpp
│   │   ├── CLogBookScreen.cpp
│   │   ├── CLogBookScreen.hpp
│   │   ├── CMFGame.cpp
│   │   ├── CMFGame.hpp
│   │   ├── CMainFlow.cpp
│   │   ├── CMainFlow.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMemoryCardDriver.cpp
│   │   ├── CMemoryCardDriver.hpp
│   │   ├── CMessageScreen.cpp
│   │   ├── CMessageScreen.hpp
│   │   ├── COptionsScreen.cpp
│   │   ├── COptionsScreen.hpp
│   │   ├── CPauseScreen.cpp
│   │   ├── CPauseScreen.hpp
│   │   ├── CPauseScreenBase.cpp
│   │   ├── CPauseScreenBase.hpp
│   │   ├── CPauseScreenBlur.cpp
│   │   ├── CPauseScreenBlur.hpp
│   │   ├── CPlayMovie.cpp
│   │   ├── CPlayMovie.hpp
│   │   ├── CPlayerVisor.cpp
│   │   ├── CPlayerVisor.hpp
│   │   ├── CPreFrontEnd.cpp
│   │   ├── CPreFrontEnd.hpp
│   │   ├── CQuitGameScreen.cpp
│   │   ├── CQuitGameScreen.hpp
│   │   ├── CSamusDoll.cpp
│   │   ├── CSamusDoll.hpp
│   │   ├── CSamusFaceReflection.cpp
│   │   ├── CSamusFaceReflection.hpp
│   │   ├── CSamusHud.cpp
│   │   ├── CSamusHud.hpp
│   │   ├── CSaveGameScreen.cpp
│   │   ├── CSaveGameScreen.hpp
│   │   ├── CSlideShow.cpp
│   │   ├── CSlideShow.hpp
│   │   ├── CSplashScreen.cpp
│   │   ├── CSplashScreen.hpp
│   │   ├── CStateSetterFlow.cpp
│   │   ├── CStateSetterFlow.hpp
│   │   ├── CTweaks.cpp
│   │   ├── CTweaks.hpp
│   │   ├── MP1.cpp
│   │   ├── MP1.hpp
│   │   ├── Tweaks/
│   │   │   ├── CTweakAutoMapper.cpp
│   │   │   ├── CTweakAutoMapper.hpp
│   │   │   ├── CTweakBall.cpp
│   │   │   ├── CTweakBall.hpp
│   │   │   ├── CTweakGame.cpp
│   │   │   ├── CTweakGame.hpp
│   │   │   ├── CTweakGui.cpp
│   │   │   ├── CTweakGui.hpp
│   │   │   ├── CTweakGuiColors.cpp
│   │   │   ├── CTweakGuiColors.hpp
│   │   │   ├── CTweakGunRes.cpp
│   │   │   ├── CTweakGunRes.hpp
│   │   │   ├── CTweakParticle.cpp
│   │   │   ├── CTweakParticle.hpp
│   │   │   ├── CTweakPlayer.cpp
│   │   │   ├── CTweakPlayer.hpp
│   │   │   ├── CTweakPlayerControl.cpp
│   │   │   ├── CTweakPlayerControl.hpp
│   │   │   ├── CTweakPlayerGun.cpp
│   │   │   ├── CTweakPlayerGun.hpp
│   │   │   ├── CTweakPlayerRes.cpp
│   │   │   ├── CTweakPlayerRes.hpp
│   │   │   ├── CTweakSlideShow.cpp
│   │   │   ├── CTweakSlideShow.hpp
│   │   │   ├── CTweakTargeting.cpp
│   │   │   └── CTweakTargeting.hpp
│   │   └── World/
│   │       ├── CAtomicAlpha.cpp
│   │       ├── CAtomicAlpha.hpp
│   │       ├── CAtomicBeta.cpp
│   │       ├── CAtomicBeta.hpp
│   │       ├── CBabygoth.cpp
│   │       ├── CBabygoth.hpp
│   │       ├── CBeetle.cpp
│   │       ├── CBeetle.hpp
│   │       ├── CBloodFlower.cpp
│   │       ├── CBloodFlower.hpp
│   │       ├── CBouncyGrenade.cpp
│   │       ├── CBouncyGrenade.hpp
│   │       ├── CBurrower.cpp
│   │       ├── CBurrower.hpp
│   │       ├── CChozoGhost.cpp
│   │       ├── CChozoGhost.hpp
│   │       ├── CDrone.cpp
│   │       ├── CDrone.hpp
│   │       ├── CDroneLaser.cpp
│   │       ├── CDroneLaser.hpp
│   │       ├── CElitePirate.cpp
│   │       ├── CElitePirate.hpp
│   │       ├── CEnergyBall.cpp
│   │       ├── CEnergyBall.hpp
│   │       ├── CEyeball.cpp
│   │       ├── CEyeball.hpp
│   │       ├── CFireFlea.cpp
│   │       ├── CFireFlea.hpp
│   │       ├── CFlaahgra.cpp
│   │       ├── CFlaahgra.hpp
│   │       ├── CFlaahgraProjectile.cpp
│   │       ├── CFlaahgraProjectile.hpp
│   │       ├── CFlaahgraTentacle.cpp
│   │       ├── CFlaahgraTentacle.hpp
│   │       ├── CFlickerBat.cpp
│   │       ├── CFlickerBat.hpp
│   │       ├── CFlyingPirate.cpp
│   │       ├── CFlyingPirate.hpp
│   │       ├── CGrenadeLauncher.cpp
│   │       ├── CGrenadeLauncher.hpp
│   │       ├── CIceAttackProjectile.cpp
│   │       ├── CIceAttackProjectile.hpp
│   │       ├── CIceSheegoth.cpp
│   │       ├── CIceSheegoth.hpp
│   │       ├── CJellyZap.cpp
│   │       ├── CJellyZap.hpp
│   │       ├── CMagdolite.cpp
│   │       ├── CMagdolite.hpp
│   │       ├── CMakeLists.txt
│   │       ├── CMetaree.cpp
│   │       ├── CMetaree.hpp
│   │       ├── CMetroid.cpp
│   │       ├── CMetroid.hpp
│   │       ├── CMetroidBeta.cpp
│   │       ├── CMetroidBeta.hpp
│   │       ├── CMetroidPrime.cpp
│   │       ├── CMetroidPrime.hpp
│   │       ├── CMetroidPrimeProjectile.cpp
│   │       ├── CMetroidPrimeProjectile.hpp
│   │       ├── CMetroidPrimeRelay.cpp
│   │       ├── CMetroidPrimeRelay.hpp
│   │       ├── CMetroidPrimeStage2.cpp
│   │       ├── CMetroidPrimeStage2.hpp
│   │       ├── CNewIntroBoss.cpp
│   │       ├── CNewIntroBoss.hpp
│   │       ├── COmegaPirate.cpp
│   │       ├── COmegaPirate.hpp
│   │       ├── CParasite.cpp
│   │       ├── CParasite.hpp
│   │       ├── CPhazonHealingNodule.cpp
│   │       ├── CPhazonHealingNodule.hpp
│   │       ├── CPhazonPool.cpp
│   │       ├── CPhazonPool.hpp
│   │       ├── CPuddleSpore.cpp
│   │       ├── CPuddleSpore.hpp
│   │       ├── CPuddleToadGamma.cpp
│   │       ├── CPuddleToadGamma.hpp
│   │       ├── CPuffer.cpp
│   │       ├── CPuffer.hpp
│   │       ├── CRidley.cpp
│   │       ├── CRidley.hpp
│   │       ├── CRipper.cpp
│   │       ├── CRipper.hpp
│   │       ├── CScriptContraption.cpp
│   │       ├── CScriptContraption.hpp
│   │       ├── CSeedling.cpp
│   │       ├── CSeedling.hpp
│   │       ├── CShockWave.cpp
│   │       ├── CShockWave.hpp
│   │       ├── CSpacePirate.cpp
│   │       ├── CSpacePirate.hpp
│   │       ├── CSpankWeed.cpp
│   │       ├── CSpankWeed.hpp
│   │       ├── CThardus.cpp
│   │       ├── CThardus.hpp
│   │       ├── CThardusRockProjectile.cpp
│   │       ├── CThardusRockProjectile.hpp
│   │       ├── CTryclops.cpp
│   │       ├── CTryclops.hpp
│   │       ├── CWarWasp.cpp
│   │       └── CWarWasp.hpp
│   ├── MP2/
│   │   └── CMakeLists.txt
│   ├── MP3/
│   │   └── CMakeLists.txt
│   ├── Memory/
│   │   ├── CCircularBuffer.cpp
│   │   └── CCircularBuffer.hpp
│   ├── MkCastTo.py
│   ├── Particle/
│   │   ├── CColorElement.cpp
│   │   ├── CColorElement.hpp
│   │   ├── CDecal.cpp
│   │   ├── CDecal.hpp
│   │   ├── CDecalDataFactory.cpp
│   │   ├── CDecalDataFactory.hpp
│   │   ├── CDecalDescription.hpp
│   │   ├── CDecalManager.cpp
│   │   ├── CDecalManager.hpp
│   │   ├── CElectricDescription.hpp
│   │   ├── CElementGen.cpp
│   │   ├── CElementGen.hpp
│   │   ├── CEmitterElement.cpp
│   │   ├── CEmitterElement.hpp
│   │   ├── CFlameWarp.cpp
│   │   ├── CFlameWarp.hpp
│   │   ├── CGenDescription.hpp
│   │   ├── CIntElement.cpp
│   │   ├── CIntElement.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CModVectorElement.cpp
│   │   ├── CModVectorElement.hpp
│   │   ├── CParticleDataFactory.cpp
│   │   ├── CParticleDataFactory.hpp
│   │   ├── CParticleElectric.cpp
│   │   ├── CParticleElectric.hpp
│   │   ├── CParticleElectricDataFactory.cpp
│   │   ├── CParticleElectricDataFactory.hpp
│   │   ├── CParticleGen.cpp
│   │   ├── CParticleGen.hpp
│   │   ├── CParticleGlobals.cpp
│   │   ├── CParticleGlobals.hpp
│   │   ├── CParticleSwoosh.cpp
│   │   ├── CParticleSwoosh.hpp
│   │   ├── CParticleSwooshDataFactory.cpp
│   │   ├── CParticleSwooshDataFactory.hpp
│   │   ├── CProjectileWeaponDataFactory.cpp
│   │   ├── CProjectileWeaponDataFactory.hpp
│   │   ├── CRealElement.cpp
│   │   ├── CRealElement.hpp
│   │   ├── CSpawnSystemKeyframeData.cpp
│   │   ├── CSpawnSystemKeyframeData.hpp
│   │   ├── CSwooshDescription.hpp
│   │   ├── CUVElement.cpp
│   │   ├── CUVElement.hpp
│   │   ├── CVectorElement.cpp
│   │   ├── CVectorElement.hpp
│   │   ├── CWarp.hpp
│   │   ├── CWeaponDescription.hpp
│   │   └── IElement.hpp
│   ├── RetroTypes.cpp
│   ├── RetroTypes.hpp
│   ├── Streams/
│   │   ├── CFileOutStream.cpp
│   │   ├── CFileOutStream.hpp
│   │   ├── CInputStream.cpp
│   │   ├── CInputStream.hpp
│   │   ├── CMemoryInStream.hpp
│   │   ├── CMemoryStreamOut.cpp
│   │   ├── CMemoryStreamOut.hpp
│   │   ├── COutputStream.cpp
│   │   ├── COutputStream.hpp
│   │   ├── CTextInStream.cpp
│   │   ├── CTextInStream.hpp
│   │   ├── CTextOutStream.cpp
│   │   ├── CTextOutStream.hpp
│   │   ├── CZipInputStream.cpp
│   │   ├── CZipInputStream.hpp
│   │   ├── ContainerReaders.hpp
│   │   ├── ContainerWriters.hpp
│   │   ├── IOStreams.cpp
│   │   └── IOStreams.hpp
│   ├── Tweaks/
│   │   ├── ITweak.hpp
│   │   ├── ITweakAutoMapper.hpp
│   │   ├── ITweakBall.hpp
│   │   ├── ITweakGame.hpp
│   │   ├── ITweakGui.hpp
│   │   ├── ITweakGuiColors.hpp
│   │   ├── ITweakGunRes.hpp
│   │   ├── ITweakParticle.hpp
│   │   ├── ITweakPlayer.hpp
│   │   ├── ITweakPlayerControl.hpp
│   │   ├── ITweakPlayerGun.cpp
│   │   ├── ITweakPlayerGun.hpp
│   │   ├── ITweakPlayerRes.hpp
│   │   ├── ITweakSlideShow.hpp
│   │   └── ITweakTargeting.hpp
│   ├── Weapon/
│   │   ├── CAuxWeapon.cpp
│   │   ├── CAuxWeapon.hpp
│   │   ├── CBeamInfo.hpp
│   │   ├── CBeamProjectile.cpp
│   │   ├── CBeamProjectile.hpp
│   │   ├── CBomb.cpp
│   │   ├── CBomb.hpp
│   │   ├── CBurstFire.cpp
│   │   ├── CBurstFire.hpp
│   │   ├── CElectricBeamProjectile.cpp
│   │   ├── CElectricBeamProjectile.hpp
│   │   ├── CEnergyProjectile.cpp
│   │   ├── CEnergyProjectile.hpp
│   │   ├── CFidget.cpp
│   │   ├── CFidget.hpp
│   │   ├── CFlameInfo.cpp
│   │   ├── CFlameInfo.hpp
│   │   ├── CFlameThrower.cpp
│   │   ├── CFlameThrower.hpp
│   │   ├── CGSComboFire.cpp
│   │   ├── CGSComboFire.hpp
│   │   ├── CGSFidget.cpp
│   │   ├── CGSFidget.hpp
│   │   ├── CGSFreeLook.cpp
│   │   ├── CGSFreeLook.hpp
│   │   ├── CGameProjectile.cpp
│   │   ├── CGameProjectile.hpp
│   │   ├── CGrappleArm.cpp
│   │   ├── CGrappleArm.hpp
│   │   ├── CGunController.cpp
│   │   ├── CGunController.hpp
│   │   ├── CGunMotion.cpp
│   │   ├── CGunMotion.hpp
│   │   ├── CGunWeapon.cpp
│   │   ├── CGunWeapon.hpp
│   │   ├── CIceBeam.cpp
│   │   ├── CIceBeam.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CNewFlameThrower.cpp
│   │   ├── CNewFlameThrower.hpp
│   │   ├── CPhazonBeam.cpp
│   │   ├── CPhazonBeam.hpp
│   │   ├── CPlasmaBeam.cpp
│   │   ├── CPlasmaBeam.hpp
│   │   ├── CPlasmaProjectile.cpp
│   │   ├── CPlasmaProjectile.hpp
│   │   ├── CPlayerGun.cpp
│   │   ├── CPlayerGun.hpp
│   │   ├── CPowerBeam.cpp
│   │   ├── CPowerBeam.hpp
│   │   ├── CPowerBomb.cpp
│   │   ├── CPowerBomb.hpp
│   │   ├── CProjectileInfo.cpp
│   │   ├── CProjectileInfo.hpp
│   │   ├── CProjectileWeapon.cpp
│   │   ├── CProjectileWeapon.hpp
│   │   ├── CTargetableProjectile.cpp
│   │   ├── CTargetableProjectile.hpp
│   │   ├── CWaveBeam.cpp
│   │   ├── CWaveBeam.hpp
│   │   ├── CWaveBuster.cpp
│   │   ├── CWaveBuster.hpp
│   │   ├── CWeapon.cpp
│   │   ├── CWeapon.hpp
│   │   ├── CWeaponMgr.cpp
│   │   ├── CWeaponMgr.hpp
│   │   ├── CWeaponMode.hpp
│   │   ├── WeaponCommon.cpp
│   │   └── WeaponCommon.hpp
│   ├── World/
│   │   ├── CActor.cpp
│   │   ├── CActor.hpp
│   │   ├── CActorModelParticles.cpp
│   │   ├── CActorModelParticles.hpp
│   │   ├── CActorParameters.hpp
│   │   ├── CAi.cpp
│   │   ├── CAi.hpp
│   │   ├── CAiFuncMap.cpp
│   │   ├── CAiFuncMap.hpp
│   │   ├── CAmbientAI.cpp
│   │   ├── CAmbientAI.hpp
│   │   ├── CAnimationParameters.hpp
│   │   ├── CDamageInfo.cpp
│   │   ├── CDamageInfo.hpp
│   │   ├── CDamageVulnerability.cpp
│   │   ├── CDamageVulnerability.hpp
│   │   ├── CDestroyableRock.cpp
│   │   ├── CDestroyableRock.hpp
│   │   ├── CEffect.cpp
│   │   ├── CEffect.hpp
│   │   ├── CEnergyDrainSource.cpp
│   │   ├── CEnergyDrainSource.hpp
│   │   ├── CEntity.cpp
│   │   ├── CEntity.hpp
│   │   ├── CEntityInfo.hpp
│   │   ├── CEnvFxManager.cpp
│   │   ├── CEnvFxManager.hpp
│   │   ├── CExplosion.cpp
│   │   ├── CExplosion.hpp
│   │   ├── CFire.cpp
│   │   ├── CFire.hpp
│   │   ├── CFishCloud.cpp
│   │   ├── CFishCloud.hpp
│   │   ├── CFishCloudModifier.cpp
│   │   ├── CFishCloudModifier.hpp
│   │   ├── CFluidPlane.cpp
│   │   ├── CFluidPlane.hpp
│   │   ├── CFluidPlaneCPU.cpp
│   │   ├── CFluidPlaneCPU.hpp
│   │   ├── CFluidPlaneDoor.cpp
│   │   ├── CFluidPlaneDoor.hpp
│   │   ├── CFluidPlaneGPU.cpp
│   │   ├── CFluidPlaneGPU.hpp
│   │   ├── CFluidPlaneManager.cpp
│   │   ├── CFluidPlaneManager.hpp
│   │   ├── CFluidUVMotion.cpp
│   │   ├── CFluidUVMotion.hpp
│   │   ├── CGameArea.cpp
│   │   ├── CGameArea.hpp
│   │   ├── CGameLight.cpp
│   │   ├── CGameLight.hpp
│   │   ├── CGrappleParameters.hpp
│   │   ├── CHUDBillboardEffect.cpp
│   │   ├── CHUDBillboardEffect.hpp
│   │   ├── CHUDMemoParms.hpp
│   │   ├── CHealthInfo.cpp
│   │   ├── CHealthInfo.hpp
│   │   ├── CIceImpact.cpp
│   │   ├── CIceImpact.hpp
│   │   ├── CKnockBackController.cpp
│   │   ├── CKnockBackController.hpp
│   │   ├── CLightParameters.hpp
│   │   ├── CMakeLists.txt
│   │   ├── CMarkerGrid.cpp
│   │   ├── CMarkerGrid.hpp
│   │   ├── CMorphBall.cpp
│   │   ├── CMorphBall.hpp
│   │   ├── CMorphBallShadow.cpp
│   │   ├── CMorphBallShadow.hpp
│   │   ├── CPathFindArea.cpp
│   │   ├── CPathFindArea.hpp
│   │   ├── CPathFindRegion.cpp
│   │   ├── CPathFindRegion.hpp
│   │   ├── CPathFindSearch.cpp
│   │   ├── CPathFindSearch.hpp
│   │   ├── CPathFindSpline.cpp
│   │   ├── CPatterned.cpp
│   │   ├── CPatterned.hpp
│   │   ├── CPatternedInfo.cpp
│   │   ├── CPatternedInfo.hpp
│   │   ├── CPhysicsActor.cpp
│   │   ├── CPhysicsActor.hpp
│   │   ├── CPlayer.cpp
│   │   ├── CPlayer.hpp
│   │   ├── CPlayerCameraBob.cpp
│   │   ├── CPlayerCameraBob.hpp
│   │   ├── CPlayerEnergyDrain.cpp
│   │   ├── CPlayerEnergyDrain.hpp
│   │   ├── CProjectedShadow.cpp
│   │   ├── CProjectedShadow.hpp
│   │   ├── CRepulsor.cpp
│   │   ├── CRepulsor.hpp
│   │   ├── CRipple.cpp
│   │   ├── CRipple.hpp
│   │   ├── CRippleManager.cpp
│   │   ├── CRippleManager.hpp
│   │   ├── CScannableParameters.hpp
│   │   ├── CScriptActor.cpp
│   │   ├── CScriptActor.hpp
│   │   ├── CScriptActorKeyframe.cpp
│   │   ├── CScriptActorKeyframe.hpp
│   │   ├── CScriptActorRotate.cpp
│   │   ├── CScriptActorRotate.hpp
│   │   ├── CScriptAiJumpPoint.cpp
│   │   ├── CScriptAiJumpPoint.hpp
│   │   ├── CScriptAreaAttributes.cpp
│   │   ├── CScriptAreaAttributes.hpp
│   │   ├── CScriptBallTrigger.cpp
│   │   ├── CScriptBallTrigger.hpp
│   │   ├── CScriptBeam.cpp
│   │   ├── CScriptBeam.hpp
│   │   ├── CScriptCameraBlurKeyframe.cpp
│   │   ├── CScriptCameraBlurKeyframe.hpp
│   │   ├── CScriptCameraFilterKeyframe.cpp
│   │   ├── CScriptCameraFilterKeyframe.hpp
│   │   ├── CScriptCameraHint.cpp
│   │   ├── CScriptCameraHint.hpp
│   │   ├── CScriptCameraHintTrigger.cpp
│   │   ├── CScriptCameraHintTrigger.hpp
│   │   ├── CScriptCameraPitchVolume.cpp
│   │   ├── CScriptCameraPitchVolume.hpp
│   │   ├── CScriptCameraShaker.cpp
│   │   ├── CScriptCameraShaker.hpp
│   │   ├── CScriptCameraWaypoint.cpp
│   │   ├── CScriptCameraWaypoint.hpp
│   │   ├── CScriptColorModulate.cpp
│   │   ├── CScriptColorModulate.hpp
│   │   ├── CScriptControllerAction.cpp
│   │   ├── CScriptControllerAction.hpp
│   │   ├── CScriptCounter.cpp
│   │   ├── CScriptCounter.hpp
│   │   ├── CScriptCoverPoint.cpp
│   │   ├── CScriptCoverPoint.hpp
│   │   ├── CScriptDamageableTrigger.cpp
│   │   ├── CScriptDamageableTrigger.hpp
│   │   ├── CScriptDebris.cpp
│   │   ├── CScriptDebris.hpp
│   │   ├── CScriptDebugCameraWaypoint.cpp
│   │   ├── CScriptDebugCameraWaypoint.hpp
│   │   ├── CScriptDistanceFog.cpp
│   │   ├── CScriptDistanceFog.hpp
│   │   ├── CScriptDock.cpp
│   │   ├── CScriptDock.hpp
│   │   ├── CScriptDockAreaChange.cpp
│   │   ├── CScriptDockAreaChange.hpp
│   │   ├── CScriptDoor.cpp
│   │   ├── CScriptDoor.hpp
│   │   ├── CScriptEMPulse.cpp
│   │   ├── CScriptEMPulse.hpp
│   │   ├── CScriptEffect.cpp
│   │   ├── CScriptEffect.hpp
│   │   ├── CScriptGenerator.cpp
│   │   ├── CScriptGenerator.hpp
│   │   ├── CScriptGrapplePoint.cpp
│   │   ├── CScriptGrapplePoint.hpp
│   │   ├── CScriptGunTurret.cpp
│   │   ├── CScriptGunTurret.hpp
│   │   ├── CScriptHUDMemo.cpp
│   │   ├── CScriptHUDMemo.hpp
│   │   ├── CScriptMazeNode.cpp
│   │   ├── CScriptMazeNode.hpp
│   │   ├── CScriptMemoryRelay.cpp
│   │   ├── CScriptMemoryRelay.hpp
│   │   ├── CScriptMidi.cpp
│   │   ├── CScriptMidi.hpp
│   │   ├── CScriptPickup.cpp
│   │   ├── CScriptPickup.hpp
│   │   ├── CScriptPickupGenerator.cpp
│   │   ├── CScriptPickupGenerator.hpp
│   │   ├── CScriptPlatform.cpp
│   │   ├── CScriptPlatform.hpp
│   │   ├── CScriptPlayerActor.cpp
│   │   ├── CScriptPlayerActor.hpp
│   │   ├── CScriptPlayerHint.cpp
│   │   ├── CScriptPlayerHint.hpp
│   │   ├── CScriptPlayerStateChange.cpp
│   │   ├── CScriptPlayerStateChange.hpp
│   │   ├── CScriptPointOfInterest.cpp
│   │   ├── CScriptPointOfInterest.hpp
│   │   ├── CScriptRandomRelay.cpp
│   │   ├── CScriptRandomRelay.hpp
│   │   ├── CScriptRelay.cpp
│   │   ├── CScriptRelay.hpp
│   │   ├── CScriptRipple.cpp
│   │   ├── CScriptRipple.hpp
│   │   ├── CScriptRoomAcoustics.cpp
│   │   ├── CScriptRoomAcoustics.hpp
│   │   ├── CScriptShadowProjector.cpp
│   │   ├── CScriptShadowProjector.hpp
│   │   ├── CScriptSound.cpp
│   │   ├── CScriptSound.hpp
│   │   ├── CScriptSpawnPoint.cpp
│   │   ├── CScriptSpawnPoint.hpp
│   │   ├── CScriptSpecialFunction.cpp
│   │   ├── CScriptSpecialFunction.hpp
│   │   ├── CScriptSpiderBallAttractionSurface.cpp
│   │   ├── CScriptSpiderBallAttractionSurface.hpp
│   │   ├── CScriptSpiderBallWaypoint.cpp
│   │   ├── CScriptSpiderBallWaypoint.hpp
│   │   ├── CScriptSpindleCamera.cpp
│   │   ├── CScriptSpindleCamera.hpp
│   │   ├── CScriptSteam.cpp
│   │   ├── CScriptSteam.hpp
│   │   ├── CScriptStreamedMusic.cpp
│   │   ├── CScriptStreamedMusic.hpp
│   │   ├── CScriptSwitch.cpp
│   │   ├── CScriptSwitch.hpp
│   │   ├── CScriptTargetingPoint.cpp
│   │   ├── CScriptTargetingPoint.hpp
│   │   ├── CScriptTimer.cpp
│   │   ├── CScriptTimer.hpp
│   │   ├── CScriptTrigger.cpp
│   │   ├── CScriptTrigger.hpp
│   │   ├── CScriptVisorFlare.cpp
│   │   ├── CScriptVisorFlare.hpp
│   │   ├── CScriptVisorGoo.cpp
│   │   ├── CScriptVisorGoo.hpp
│   │   ├── CScriptWater.cpp
│   │   ├── CScriptWater.hpp
│   │   ├── CScriptWaypoint.cpp
│   │   ├── CScriptWaypoint.hpp
│   │   ├── CScriptWorldTeleporter.cpp
│   │   ├── CScriptWorldTeleporter.hpp
│   │   ├── CSnakeWeedSwarm.cpp
│   │   ├── CSnakeWeedSwarm.hpp
│   │   ├── CStateMachine.cpp
│   │   ├── CStateMachine.hpp
│   │   ├── CTeamAiMgr.cpp
│   │   ├── CTeamAiMgr.hpp
│   │   ├── CTeamAiTypes.hpp
│   │   ├── CVisorFlare.cpp
│   │   ├── CVisorFlare.hpp
│   │   ├── CVisorParameters.hpp
│   │   ├── CWallCrawlerSwarm.cpp
│   │   ├── CWallCrawlerSwarm.hpp
│   │   ├── CWallWalker.cpp
│   │   ├── CWallWalker.hpp
│   │   ├── CWorld.cpp
│   │   ├── CWorld.hpp
│   │   ├── CWorldLight.cpp
│   │   ├── CWorldLight.hpp
│   │   ├── CWorldShadow.cpp
│   │   ├── CWorldShadow.hpp
│   │   ├── CWorldTransManager.cpp
│   │   ├── CWorldTransManager.hpp
│   │   ├── IGameArea.cpp
│   │   ├── IGameArea.hpp
│   │   ├── ScriptLoader.cpp
│   │   ├── ScriptLoader.hpp
│   │   ├── ScriptObjectSupport.cpp
│   │   └── ScriptObjectSupport.hpp
│   ├── platforms/
│   │   ├── freedesktop/
│   │   │   ├── metaforce.desktop
│   │   │   └── mkwmicon.c
│   │   ├── ios/
│   │   │   ├── Assets.car
│   │   │   ├── Base.lproj/
│   │   │   │   └── LaunchScreen.storyboardc/
│   │   │   │       ├── 01J-lp-oVM-view-Ze5-6b-2t3.nib
│   │   │   │       ├── Info.plist
│   │   │   │       └── UIViewController-01J-lp-oVM.nib
│   │   │   └── Info.plist.in
│   │   ├── macos/
│   │   │   ├── Info.plist.in
│   │   │   └── mainicon.icns
│   │   ├── tvos/
│   │   │   ├── Assets.car
│   │   │   ├── Base.lproj/
│   │   │   │   └── LaunchScreen.storyboardc/
│   │   │   │       ├── BYZ-38-t0r-view-8bC-Xf-vdC.nib
│   │   │   │       ├── Info.plist
│   │   │   │       └── UIViewController-BYZ-38-t0r.nib
│   │   │   └── Info.plist.in
│   │   └── win/
│   │       ├── Package.appxmanifest
│   │       ├── metaforce.aps
│   │       ├── metaforce.manifest
│   │       └── metaforce.rc.in
│   └── rstl.hpp
├── android/
│   ├── .gitignore
│   ├── README.md
│   ├── app/
│   │   ├── build.gradle
│   │   ├── proguard-rules.pro
│   │   └── src/
│   │       └── main/
│   │           ├── AndroidManifest.xml
│   │           ├── java/
│   │           │   ├── com/
│   │           │   │   └── axiodl/
│   │           │   │       └── metaforce/
│   │           │   │           └── MetaforceActivity.java
│   │           │   └── org/
│   │           │       └── libsdl/
│   │           │           └── app/
│   │           │               ├── HIDDevice.java
│   │           │               ├── HIDDeviceBLESteamController.java
│   │           │               ├── HIDDeviceManager.java
│   │           │               ├── HIDDeviceUSB.java
│   │           │               ├── SDL.java
│   │           │               ├── SDLActivity.java
│   │           │               ├── SDLAudioManager.java
│   │           │               ├── SDLControllerManager.java
│   │           │               ├── SDLDummyEdit.java
│   │           │               ├── SDLInputConnection.java
│   │           │               └── SDLSurface.java
│   │           └── res/
│   │               └── values/
│   │                   └── strings.xml
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── scripts/
│   │   ├── stage-jni-libs.sh
│   │   └── sync-sdl-java.sh
│   └── settings.gradle
├── bintoc/
│   ├── CMakeLists.txt
│   ├── bintoc.c
│   └── bintocHelpers.cmake
├── ci/
│   ├── build-appimage.sh
│   ├── build-dmg.sh
│   ├── build-ipa.sh
│   ├── upload-debug-linux.sh
│   └── upload-debug-macos.sh
├── extern/
│   └── CMakeLists.txt
├── gbalink/
│   ├── CMakeLists.txt
│   └── main.cpp
├── imgui/
│   ├── CMakeLists.txt
│   ├── ImGuiEngine.cpp
│   ├── ImGuiEngine.hpp
│   ├── magic_enum.hpp
│   └── stb_image.h
├── ios.toolchain.cmake
├── lldb-extras/
│   ├── .lldbinit
│   ├── README.txt
│   └── metaforce_lldb_tools.py
├── normalize_submodules.sh
└── version.h.in
Download .txt
Showing preview only (920K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (9884 symbols across 1166 files)

FILE: NESEmulator/CNESEmulator.cpp
  function GetTickCount (line 45) | static std::chrono::milliseconds::rep GetTickCount() {
  function audioUpdate (line 160) | int audioUpdate() {
  type metaforce::MP1 (line 167) | namespace metaforce::MP1 {
    function nesEmuFdsSetup (line 497) | static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst)
    type BitstreamState (line 519) | struct BitstreamState {
      method BitstreamState (line 524) | BitstreamState(u8* pos) : rPos(pos) {}
      method resetDecBit (line 525) | void resetDecBit() { decBit = 0; }
      method runDecBit (line 526) | void runDecBit() {

FILE: NESEmulator/CNESEmulator.hpp
  type metaforce (line 9) | namespace metaforce {
    type CFinalInput (line 10) | struct CFinalInput
    class IDvdRequest (line 11) | class IDvdRequest
    type MP1 (line 13) | namespace MP1 {
      class CNESEmulator (line 17) | class CNESEmulator final {
        type EPasswordEntryState (line 19) | enum class EPasswordEntryState { NotPasswordScreen, NotEntered, En...
        type Vert (line 27) | struct Vert {
        type Uniform (line 32) | struct Uniform {
        method u8 (line 79) | const u8* GetPassword() const { return x21_passwordFromNES; }
        method IsGameOver (line 80) | bool IsGameOver() const { return x20_gameOver; }
        method EPasswordEntryState (line 81) | EPasswordEntryState GetPasswordEntryState() const { return x34_pas...

FILE: NESEmulator/apu.c
  function apuGetMaxBufSize (line 3) | uint32_t apuGetMaxBufSize()
  function apuResetPos (line 8) | void apuResetPos()

FILE: Runtime/Audio/CAudioGroupSet.cpp
  type metaforce (line 5) | namespace metaforce {
    function CFactoryFnReturn (line 36) | CFactoryFnReturn FAudioGroupSetDataFactory(const metaforce::SObjectTag...

FILE: Runtime/Audio/CAudioGroupSet.hpp
  type metaforce (line 14) | namespace metaforce {
    class CAudioGroupSet (line 16) | class CAudioGroupSet {
      method GetName (line 26) | std::string_view GetName() const { return x20_name; }

FILE: Runtime/Audio/CAudioSys.cpp
  type metaforce (line 9) | namespace metaforce {
    function s16 (line 89) | s16 CAudioSys::GetDefaultVolumeScale() { return s_DefaultVolumeScale; }

FILE: Runtime/Audio/CAudioSys.hpp
  type metaforce (line 11) | namespace metaforce {
    class CAudioGroupSet (line 12) | class CAudioGroupSet
    class CSimplePool (line 13) | class CSimplePool
    class CAudioSys (line 18) | class CAudioSys {
      type ESurroundModes (line 20) | enum class ESurroundModes { Mono, Stereo, Surround }
      type C3DEmitterParmData (line 27) | struct C3DEmitterParmData {
      method CAudioSys (line 39) | CAudioSys(u8, u8, u8, u8, u32) {
      method SetSurroundMode (line 44) | static void SetSurroundMode(ESurroundModes mode) {}

FILE: Runtime/Audio/CMidiManager.cpp
  type metaforce (line 5) | namespace metaforce {
    function CMidiHandle (line 26) | CMidiHandle CMidiManager::Play(const CMidiData& data, float fadeTime, ...
    function CFactoryFnReturn (line 49) | CFactoryFnReturn FMidiDataFactory(const SObjectTag& tag, CInputStream&...

FILE: Runtime/Audio/CMidiManager.hpp
  type metaforce (line 7) | namespace metaforce {
    class CMidiManager (line 9) | class CMidiManager {
      class CMidiData (line 11) | class CMidiData {
        method u16 (line 18) | u16 GetSetupId() const { return x0_setupId; }
        method u16 (line 19) | u16 GetGroupId() const { return x2_groupId; }
        method CAssetId (line 20) | CAssetId GetAGSCAssetId() const { return x4_agscId; }
        method u8 (line 21) | const u8* GetArrData() const { return x8_arrData.get(); }
      class CMidiWrapper (line 25) | class CMidiWrapper {
        method IsAvailable (line 36) | bool IsAvailable() const { return xa_available; }
        method SetAvailable (line 37) | void SetAvailable(bool available) { xa_available = available; }
        method u16 (line 38) | u16 GetSongId() const { return x8_songId; }
        method SetSongId (line 39) | void SetSongId(u16 songId) { x8_songId = songId; }

FILE: Runtime/Audio/CSfxManager.cpp
  type metaforce (line 6) | namespace metaforce {
    function CFactoryFnReturn (line 20) | CFactoryFnReturn FAudioTranslationTableFactory(const SObjectTag& tag, ...
    function u16 (line 86) | u16 CSfxManager::CSfxWrapper::GetSfxId() const { return x18_sfxId; }
    function u16 (line 154) | u16 CSfxManager::CSfxEmitterWrapper::GetSfxId() const { return x24_par...
    function s16 (line 263) | s16 CSfxManager::GetRank(CBaseSfxWrapper* sfx) {
    function u16 (line 331) | u16 CSfxManager::TranslateSFXID(u16 id) {
    function CSfxHandle (line 360) | CSfxHandle CSfxManager::SfxStart(u16 id, float vol, float pan, bool us...
    function CSfxHandle (line 395) | CSfxHandle CSfxManager::AddEmitter(u16 id, const zeus::CVector3f& pos,...
    function CSfxHandle (line 412) | CSfxHandle CSfxManager::AddEmitter(u16 id, const zeus::CVector3f& pos,...
    function CSfxHandle (line 429) | CSfxHandle CSfxManager::AddEmitter(const CAudioSys::C3DEmitterParmData...

FILE: Runtime/Audio/CSfxManager.hpp
  type metaforce (line 14) | namespace metaforce {
    class CSfxManager (line 16) | class CSfxManager {
      type ESfxChannels (line 20) | enum class ESfxChannels { Invalid = -1, Default = 0, Game, PauseScre...
      type ESfxAudibility (line 22) | enum class ESfxAudibility { Aud0, Aud1, Aud2, Aud3 }
      type EAuxEffect (line 24) | enum class EAuxEffect { None = -1, ReverbHi = 0, Chorus, ReverbStd, ...
      class CBaseSfxWrapper (line 26) | class CBaseSfxWrapper
        method SetActive (line 76) | virtual void SetActive(bool v) { x14_24_isActive = v; }
        method SetPlaying (line 77) | virtual void SetPlaying(bool v) { x14_25_isPlaying = v; }
        method SetRank (line 78) | virtual void SetRank(short v) { x8_rank = v; }
        method SetInArea (line 79) | virtual void SetInArea(bool v) { x14_27_inArea = v; }
        method IsInArea (line 80) | virtual bool IsInArea() const { return x14_27_inArea; }
        method IsPlaying (line 81) | virtual bool IsPlaying() const { return x14_25_isPlaying; }
        method UseAcoustics (line 82) | virtual bool UseAcoustics() const { return x14_29_useAcoustics; }
        method IsLooped (line 83) | virtual bool IsLooped() const { return x14_26_looped; }
        method IsActive (line 84) | virtual bool IsActive() const { return x14_24_isActive; }
        method s16 (line 85) | virtual s16 GetRank() const { return x8_rank; }
        method s16 (line 86) | virtual s16 GetPriority() const { return xa_prio; }
        method TAreaId (line 87) | virtual TAreaId GetArea() const { return x10_area; }
        method CSfxHandle (line 88) | virtual CSfxHandle GetSfxHandle() { return shared_from_this(); }
        method IsEmitter (line 98) | bool IsEmitter() const { return m_isEmitter; }
        method Release (line 100) | void Release() {
        method IsReleased (line 104) | bool IsReleased() const { return x14_28_isReleased; }
        method Close (line 106) | void Close() { m_isClosed = true; }
        method IsClosed (line 107) | bool IsClosed() const { return m_isClosed; }
        method GetTimeRemaining (line 109) | float GetTimeRemaining() const { return x4_timeRemaining; }
        method SetTimeRemaining (line 110) | void SetTimeRemaining(float t) { x4_timeRemaining = t; }
        method CBaseSfxWrapper (line 112) | CBaseSfxWrapper(bool looped, s16 prio, /*const CSfxHandle& handle,...
      class CSfxChannel (line 40) | class CSfxChannel {
      class CBaseSfxWrapper (line 57) | class CBaseSfxWrapper : public std::enable_shared_from_this<CBaseSfx...
        method SetActive (line 76) | virtual void SetActive(bool v) { x14_24_isActive = v; }
        method SetPlaying (line 77) | virtual void SetPlaying(bool v) { x14_25_isPlaying = v; }
        method SetRank (line 78) | virtual void SetRank(short v) { x8_rank = v; }
        method SetInArea (line 79) | virtual void SetInArea(bool v) { x14_27_inArea = v; }
        method IsInArea (line 80) | virtual bool IsInArea() const { return x14_27_inArea; }
        method IsPlaying (line 81) | virtual bool IsPlaying() const { return x14_25_isPlaying; }
        method UseAcoustics (line 82) | virtual bool UseAcoustics() const { return x14_29_useAcoustics; }
        method IsLooped (line 83) | virtual bool IsLooped() const { return x14_26_looped; }
        method IsActive (line 84) | virtual bool IsActive() const { return x14_24_isActive; }
        method s16 (line 85) | virtual s16 GetRank() const { return x8_rank; }
        method s16 (line 86) | virtual s16 GetPriority() const { return xa_prio; }
        method TAreaId (line 87) | virtual TAreaId GetArea() const { return x10_area; }
        method CSfxHandle (line 88) | virtual CSfxHandle GetSfxHandle() { return shared_from_this(); }
        method IsEmitter (line 98) | bool IsEmitter() const { return m_isEmitter; }
        method Release (line 100) | void Release() {
        method IsReleased (line 104) | bool IsReleased() const { return x14_28_isReleased; }
        method Close (line 106) | void Close() { m_isClosed = true; }
        method IsClosed (line 107) | bool IsClosed() const { return m_isClosed; }
        method GetTimeRemaining (line 109) | float GetTimeRemaining() const { return x4_timeRemaining; }
        method SetTimeRemaining (line 110) | void SetTimeRemaining(float t) { x4_timeRemaining = t; }
        method CBaseSfxWrapper (line 112) | CBaseSfxWrapper(bool looped, s16 prio, /*const CSfxHandle& handle,...
      class CSfxEmitterWrapper (line 116) | class CSfxEmitterWrapper : public CBaseSfxWrapper {
        method CSfxEmitterWrapper (line 138) | CSfxEmitterWrapper(bool looped, s16 prio, const CAudioSys::C3DEmit...
      class CSfxWrapper (line 145) | class CSfxWrapper : public CBaseSfxWrapper {
        method ESfxAudibility (line 157) | ESfxAudibility GetAudible(const zeus::CVector3f&) override { retur...
        method SetVolume (line 163) | void SetVolume(float vol) { x20_vol = vol; }
        method CSfxWrapper (line 165) | CSfxWrapper(bool looped, s16 prio, u16 sfxId, float vol, float pan,
      method IsAuxProcessingEnabled (line 189) | static bool IsAuxProcessingEnabled() { return m_auxProcessingEnabled; }
      method ESfxChannels (line 194) | static ESfxChannels GetCurrentChannel() { return m_currentChannel; }

FILE: Runtime/Audio/CStaticAudioPlayer.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Audio/CStaticAudioPlayer.hpp
  type metaforce (line 16) | namespace metaforce {
    class IDvdRequest (line 17) | class IDvdRequest
    class CStaticAudioPlayer (line 19) | class CStaticAudioPlayer {
      method SampClamp (line 37) | static int16_t SampClamp(int32_t val) {
      method SetVolume (line 69) | void SetVolume(float vol) { xc0_volume = zeus::clamp(0.f, vol, 1.f) ...

FILE: Runtime/Audio/CStreamAudioManager.cpp
  type metaforce (line 16) | namespace metaforce {
    class CDSPStreamManager (line 17) | class CDSPStreamManager
      type EState (line 444) | enum class EState { Looping, Oneshot, Preparing }
      method CDSPStreamManager (line 463) | CDSPStreamManager() = default;
      method CDSPStreamManager (line 465) | CDSPStreamManager(std::string_view fileName, s32 handle, float volum...
      method s32 (line 472) | static s32 FindUnclaimedStreamIdx() {
      method FindUnclaimedStereoPair (line 482) | static bool FindUnclaimedStereoPair(s32& left, s32& right) {
      method s32 (line 497) | static s32 FindClaimedStreamIdx(s32 handle) {
      method s32 (line 507) | static s32 GetFreeHandleId() {
      method EState (line 530) | static EState GetStreamState(s32 handle) {
      method CanStop (line 546) | static bool CanStop(s32 handle) {
      method IsStreamAvailable (line 561) | static bool IsStreamAvailable(s32 handle) {
      method AllocateStream (line 576) | static void AllocateStream(s32 idx) {
      method HeaderReadComplete (line 600) | void HeaderReadComplete() {
      method PollHeaderReadCompletions (line 647) | static void PollHeaderReadCompletions() {
      method StartMonoHeaderRead (line 656) | static bool StartMonoHeaderRead(CDSPStreamManager& stream) {
      method StartStereoHeaderRead (line 669) | static bool StartStereoHeaderRead(CDSPStreamManager& lstream, CDSPSt...
      method WaitForReadCompletion (line 690) | void WaitForReadCompletion() {
      method s32 (line 696) | static s32 StartStreaming(std::string_view fileName, float volume, b...
      method StopStreaming (line 759) | static void StopStreaming(s32 handle) {
      method UpdateVolume (line 781) | static void UpdateVolume(s32 handle, float volume) {
      method Initialize (line 794) | static void Initialize() {
      method Shutdown (line 801) | static void Shutdown() {
    type dspadpcm_header (line 23) | struct dspadpcm_header {
    type SDSPStreamInfo (line 43) | struct SDSPStreamInfo {
      method SDSPStreamInfo (line 53) | SDSPStreamInfo() = default;
    type SDSPStream (line 57) | struct SDSPStream  {
      method ReadBuffer (line 80) | void ReadBuffer(int buf) {
      method BufferStream (line 125) | bool BufferStream() {
      method DoAllocateStream (line 240) | void DoAllocateStream() {
      method Initialize (line 245) | static void Initialize() {
      method FreeAllStreams (line 261) | static void FreeAllStreams() {
      method s32 (line 276) | static s32 PickFreeStream(SDSPStream*& streamOut, bool oneshot) {
      method s32 (line 294) | static s32 FindStreamIdx(s32 id) {
      method UpdateStreamVolume (line 304) | void UpdateStreamVolume(float vol) {
      method UpdateVolume (line 315) | static void UpdateVolume(s32 id, float vol) {
      method SilenceStream (line 328) | void SilenceStream() {
      method Silence (line 338) | static void Silence(s32 id) {
      method StopStream (line 351) | void StopStream() {
      method IsStreamActive (line 357) | static bool IsStreamActive(s32 id) {
      method IsStreamAvailable (line 366) | static bool IsStreamAvailable(s32 id) {
      method s32 (line 375) | static s32 AllocateMono(const SDSPStreamInfo& info, float vol, bool ...
      method s32 (line 386) | static s32 AllocateStereo(const SDSPStreamInfo& linfo, const SDSPStr...
      method AllocateStream (line 404) | void AllocateStream(const SDSPStreamInfo& info, float vol, float lef...
    class CDSPStreamManager (line 440) | class CDSPStreamManager {
      type EState (line 444) | enum class EState { Looping, Oneshot, Preparing }
      method CDSPStreamManager (line 463) | CDSPStreamManager() = default;
      method CDSPStreamManager (line 465) | CDSPStreamManager(std::string_view fileName, s32 handle, float volum...
      method s32 (line 472) | static s32 FindUnclaimedStreamIdx() {
      method FindUnclaimedStereoPair (line 482) | static bool FindUnclaimedStereoPair(s32& left, s32& right) {
      method s32 (line 497) | static s32 FindClaimedStreamIdx(s32 handle) {
      method s32 (line 507) | static s32 GetFreeHandleId() {
      method EState (line 530) | static EState GetStreamState(s32 handle) {
      method CanStop (line 546) | static bool CanStop(s32 handle) {
      method IsStreamAvailable (line 561) | static bool IsStreamAvailable(s32 handle) {
      method AllocateStream (line 576) | static void AllocateStream(s32 idx) {
      method HeaderReadComplete (line 600) | void HeaderReadComplete() {
      method PollHeaderReadCompletions (line 647) | static void PollHeaderReadCompletions() {
      method StartMonoHeaderRead (line 656) | static bool StartMonoHeaderRead(CDSPStreamManager& stream) {
      method StartStereoHeaderRead (line 669) | static bool StartStereoHeaderRead(CDSPStreamManager& lstream, CDSPSt...
      method WaitForReadCompletion (line 690) | void WaitForReadCompletion() {
      method s32 (line 696) | static s32 StartStreaming(std::string_view fileName, float volume, b...
      method StopStreaming (line 759) | static void StopStreaming(s32 handle) {
      method UpdateVolume (line 781) | static void UpdateVolume(s32 handle, float volume) {
      method Initialize (line 794) | static void Initialize() {
      method Shutdown (line 801) | static void Shutdown() {
    type EPlayerState (line 834) | enum class EPlayerState { Stopped, FadeIn, Playing, FadeOut, FadeOutNo...
    type SDSPPlayer (line 836) | struct SDSPPlayer {
      method SDSPPlayer (line 846) | SDSPPlayer() = default;
      method SDSPPlayer (line 847) | SDSPPlayer(EPlayerState playing, std::string_view fileName, float vo...

FILE: Runtime/Audio/CStreamAudioManager.hpp
  type metaforce (line 7) | namespace metaforce {
    class CStreamAudioManager (line 9) | class CStreamAudioManager {

FILE: Runtime/Audio/g721.c
  function quan (line 46) | static int
  function fmult (line 66) | static int
  function g72x_init_state (line 95) | void
  function predictor_zero (line 123) | static int
  function predictor_pole (line 141) | static int
  function step_size (line 154) | static long
  function reconstruct (line 183) | static int
  function update (line 212) | static void
  function g721_decoder (line 429) | int

FILE: Runtime/Audio/g721.h
  type g72x_state (line 8) | struct g72x_state {
  type g72x_state (line 35) | struct g72x_state
  type g72x_state (line 39) | struct g72x_state

FILE: Runtime/AutoMapper/CAutoMapper.cpp
  type metaforce (line 20) | namespace metaforce {
    function TAreaId (line 851) | TAreaId CAutoMapper::FindClosestVisibleArea(const zeus::CVector3f& poi...
    function CAssetId (line 1586) | CAssetId CAutoMapper::GetAreaHintDescriptionString(CAssetId mreaId) {

FILE: Runtime/AutoMapper/CAutoMapper.hpp
  type metaforce (line 20) | namespace metaforce {
    class CMapWorldInfo (line 21) | class CMapWorldInfo
    class CStateManager (line 22) | class CStateManager
    class IWorld (line 23) | class IWorld
    type CFinalInput (line 25) | struct CFinalInput
    class CAutoMapper (line 27) | class CAutoMapper {
      type ELoadPhase (line 30) | enum class ELoadPhase { LoadResources, LoadUniverse, Done }
      type EAutoMapperState (line 31) | enum class EAutoMapperState { MiniMap, MapScreen, MapScreenUniverse }
      type SAutoMapperRenderState (line 32) | struct SAutoMapperRenderState {
        type Ease (line 33) | enum class Ease { None, Linear, Out, In, InOut }
        method SAutoMapperRenderState (line 54) | SAutoMapperRenderState() = default;
        method SAutoMapperRenderState (line 55) | SAutoMapperRenderState(FGetViewportSize getViewportSize, const zeu...
        method ResetInterpolation (line 74) | void ResetInterpolation() {
        method GetViewportSize (line 83) | zeus::CVector2i GetViewportSize() const {
      type SAutoMapperHintStep (line 91) | struct SAutoMapperHintStep {
        type Type (line 92) | enum class Type { PanToArea, PanToWorld, SwitchToUniverse, SwitchT...
        type PanToArea (line 93) | struct PanToArea {}
        type PanToWorld (line 94) | struct PanToWorld {}
        type SwitchToUniverse (line 95) | struct SwitchToUniverse {}
        type SwitchToWorld (line 96) | struct SwitchToWorld {}
        type ShowBeacon (line 97) | struct ShowBeacon {}
        type ZoomIn (line 98) | struct ZoomIn {}
        type ZoomOut (line 99) | struct ZoomOut {}
        method SAutoMapperHintStep (line 109) | SAutoMapperHintStep(PanToArea, TAreaId areaId) : x0_type(Type::Pan...
        method SAutoMapperHintStep (line 110) | SAutoMapperHintStep(PanToWorld, CAssetId worldId) : x0_type(Type::...
        method SAutoMapperHintStep (line 111) | SAutoMapperHintStep(SwitchToUniverse) : x0_type(Type::SwitchToUniv...
        method SAutoMapperHintStep (line 112) | SAutoMapperHintStep(SwitchToWorld, CAssetId worldId) : x0_type(Typ...
        method SAutoMapperHintStep (line 113) | SAutoMapperHintStep(ShowBeacon, float val) : x0_type(Type::ShowBea...
        method SAutoMapperHintStep (line 114) | SAutoMapperHintStep(ZoomIn) : x0_type(Type::ZoomIn), x4_worldId(CA...
        method SAutoMapperHintStep (line 115) | SAutoMapperHintStep(ZoomOut) : x0_type(Type::ZoomOut), x4_worldId(...
      type SAutoMapperHintLocation (line 118) | struct SAutoMapperHintLocation {
      type EZoomState (line 126) | enum class EZoomState { None, In, Out }
      method SetResLockState (line 187) | static void SetResLockState(T& list, bool lock) {
      method GetMapAreaMiniMapDrawDepth (line 203) | static float GetMapAreaMiniMapDrawDepth() { return 2.f; }
      method GetMapRotationX (line 229) | float GetMapRotationX() const { return xa8_renderStates[0].x1c_camAn...
      method GetMapRotationZ (line 230) | float GetMapRotationZ() const { return xa8_renderStates[0].x8_camOri...
      method TAreaId (line 231) | TAreaId GetFocusAreaIndex() const { return xa0_curAreaId; }
      method CAssetId (line 232) | CAssetId GetCurrWorldAssetId() const { return x24_world->IGetWorldAs...
      method IsInPlayerControlState (line 237) | bool IsInPlayerControlState() const {
      method GetTimeIntoInterpolation (line 242) | float GetTimeIntoInterpolation() const { return x1c8_interpTime; }
      method EAutoMapperState (line 261) | EAutoMapperState GetNextState() const { return x1c0_nextState; }
      method IsInMapperState (line 262) | bool IsInMapperState(EAutoMapperState state) const { return state ==...
      method IsInMapperStateTransition (line 263) | bool IsInMapperStateTransition() const { return x1c0_nextState != x1...
      method IsRenderStateInterpolating (line 264) | bool IsRenderStateInterpolating() const { return x1c8_interpTime < x...
      method IsStateTransitioning (line 265) | bool IsStateTransitioning() const { return x1bc_state != x1c0_nextSt...
      method IsFullyInMiniMapState (line 266) | bool IsFullyInMiniMapState() const { return IsInMapperState(EAutoMap...
      method IsFullyOutOfMiniMapState (line 267) | bool IsFullyOutOfMiniMapState() const {
      method GetInterp (line 271) | float GetInterp() const {

FILE: Runtime/AutoMapper/CMapArea.cpp
  type metaforce (line 13) | namespace metaforce {
    function CFactoryFnReturn (line 231) | CFactoryFnReturn FMapAreaFactory(const SObjectTag& objTag, CInputStrea...

FILE: Runtime/AutoMapper/CMapArea.hpp
  type metaforce (line 14) | namespace metaforce {
    class IWorld (line 18) | class IWorld
    class CMapArea (line 19) | class CMapArea {
      class CMapAreaSurface (line 21) | class CMapAreaSurface {
        method CVector3f (line 36) | const CVector3f& GetNormal() const { return x0_normal; }
        method CVector3f (line 37) | const CVector3f& GetCenterPosition() const { return xc_centroid; }
      type EVisMode (line 39) | enum class EVisMode { Always, MapStationOrVisit, Visit, Never }
      method GetAreaCenterPoint (line 63) | zeus::CVector3f GetAreaCenterPoint() const { return x10_box.center(); }
      method CMappableObject (line 65) | CMappableObject& GetMappableObject(int idx) { return m_mappableObjec...
      method CMappableObject (line 66) | const CMappableObject& GetMappableObject(int idx) const { return m_m...
      method CMapAreaSurface (line 67) | CMapAreaSurface& GetSurface(int idx) { return m_surfaces[idx]; }
        method CVector3f (line 36) | const CVector3f& GetNormal() const { return x0_normal; }
        method CVector3f (line 37) | const CVector3f& GetCenterPosition() const { return xc_centroid; }
      method CMapAreaSurface (line 68) | const CMapAreaSurface& GetSurface(int idx) const { return m_surfaces...
        method CVector3f (line 36) | const CVector3f& GetNormal() const { return x0_normal; }
        method CVector3f (line 37) | const CVector3f& GetCenterPosition() const { return xc_centroid; }
      method u32 (line 69) | u32 GetNumMappableObjects() const { return m_mappableObjects.size(); }
      method u32 (line 70) | u32 GetNumSurfaces() const { return m_surfaces.size(); }
      method TConstVectorRef (line 73) | TConstVectorRef GetVertices() const { return m_verts; }

FILE: Runtime/AutoMapper/CMapUniverse.cpp
  type metaforce (line 7) | namespace metaforce {
    function CFactoryFnReturn (line 119) | CFactoryFnReturn FMapUniverseFactory(const SObjectTag&, CInputStream& ...

FILE: Runtime/AutoMapper/CMapUniverse.hpp
  type metaforce (line 15) | namespace metaforce {
    class CStateManager (line 16) | class CStateManager
    class CMapUniverse (line 17) | class CMapUniverse {
      class CMapUniverseDrawParms (line 19) | class CMapUniverseDrawParms {
        method CMapUniverseDrawParms (line 30) | CMapUniverseDrawParms(float alpha, int wldIdx, CAssetId wldRes, in...
        method GetFocusWorldIndex (line 41) | int GetFocusWorldIndex() const { return x4_wldIdx; }
        method GetAlpha (line 44) | float GetAlpha() const { return x0_alpha; }
        method CAssetId (line 45) | CAssetId GetWorldAssetId() const { return x8_wldRes; }
        method GetClosestArea (line 46) | int GetClosestArea() const { return xc_closestHex; }
        method GetFlashPulse (line 47) | float GetFlashPulse() const { return x10_flashPulse; }
      class CMapObjectSortInfo (line 50) | class CMapObjectSortInfo {
        method CMapObjectSortInfo (line 59) | CMapObjectSortInfo(float zDist, int wldIdx, int hexIdx, int surfId...
        method GetObjectIndex (line 69) | int GetObjectIndex() const { return xc_surfIdx; }
        method GetAreaIndex (line 70) | int GetAreaIndex() const { return x8_hexIdx; }
        method GetWorldIndex (line 71) | int GetWorldIndex() const { return x4_wldIdx; }
        method GetZDistance (line 72) | float GetZDistance() const { return x0_zDist; }
      class CMapWorldData (line 75) | class CMapWorldData {
        method CAssetId (line 88) | CAssetId GetWorldAssetId() const { return x10_worldAssetId; }
        method GetWorldLabel (line 90) | std::string_view GetWorldLabel() const { return x0_label; }
        method u32 (line 93) | u32 GetNumMapAreaDatas() const { return x44_hexagonXfs.size(); }
      method CMapWorldData (line 109) | const CMapWorldData& GetMapWorldData(s32 idx) const { return x10_wor...
        method CAssetId (line 88) | CAssetId GetWorldAssetId() const { return x10_worldAssetId; }
        method GetWorldLabel (line 90) | std::string_view GetWorldLabel() const { return x0_label; }
        method u32 (line 93) | u32 GetNumMapAreaDatas() const { return x44_hexagonXfs.size(); }
      method CMapWorldData (line 110) | const CMapWorldData& GetMapWorldDataByWorldId(CAssetId id) const {
        method CAssetId (line 88) | CAssetId GetWorldAssetId() const { return x10_worldAssetId; }
        method GetWorldLabel (line 90) | std::string_view GetWorldLabel() const { return x0_label; }
        method u32 (line 93) | u32 GetNumMapAreaDatas() const { return x44_hexagonXfs.size(); }
      method u32 (line 116) | u32 GetNumMapWorldDatas() const { return x10_worldDatas.size(); }
      method GetMapUniverseRadius (line 117) | float GetMapUniverseRadius() const { return x2c_universeRadius; }
      method begin (line 120) | std::vector<CMapWorldData>::const_iterator begin() const { return x1...
      method end (line 121) | std::vector<CMapWorldData>::const_iterator end() const { return x10_...

FILE: Runtime/AutoMapper/CMapWorld.cpp
  type metaforce (line 13) | namespace metaforce {
    type Support (line 15) | struct Support {
    type Circle2 (line 20) | struct Circle2 {
    type Circle (line 25) | struct Circle {
      method Circle (line 28) | Circle(const Circle2& circ2) : x0_point(circ2.x0_point), x8_radius(s...
    function Circle2 (line 31) | Circle2 ExactCircle1(const zeus::CVector2f* a) {
    function Circle2 (line 38) | Circle2 ExactCircle2(const zeus::CVector2f* a, const zeus::CVector2f* ...
    function Circle2 (line 45) | Circle2 ExactCircle3(const zeus::CVector2f* a, const zeus::CVector2f* ...
    function PointInsideCircle (line 67) | bool PointInsideCircle(const zeus::CVector2f& point, const Circle2& ci...
    function Circle2 (line 72) | Circle2 UpdateSupport1(int idx, const zeus::CVector2f** list, Support&...
    function Circle2 (line 79) | Circle2 UpdateSupport2(int idx, const zeus::CVector2f** list, Support&...
    function Circle2 (line 108) | Circle2 UpdateSupport3(int idx, const zeus::CVector2f** list, Support&...
    function Circle (line 234) | Circle MinCircle(const std::vector<zeus::CVector2f>& coords) {
      method Circle (line 28) | Circle(const Circle2& circ2) : x0_point(circ2.x0_point), x8_radius(s...
    function s32 (line 358) | s32 CMapWorld::GetCurrentMapAreaDepth(const IWorld& wld, TAreaId aid) {
    function CFactoryFnReturn (line 698) | CFactoryFnReturn FMapWorldFactory(const SObjectTag& tag, CInputStream&...

FILE: Runtime/AutoMapper/CMapWorld.hpp
  type metaforce (line 14) | namespace metaforce {
    class CMapWorldInfo (line 15) | class CMapWorldInfo
    class CStateManager (line 16) | class CStateManager
    class IWorld (line 17) | class IWorld
    class CMapWorld (line 19) | class CMapWorld {
      type EMapAreaList (line 22) | enum class EMapAreaList { Loaded, Loading, Unloaded }
      class CMapAreaBFSInfo (line 24) | class CMapAreaBFSInfo {
        method CMapAreaBFSInfo (line 31) | CMapAreaBFSInfo(int areaIdx, int depth, float a, float b)
        method GetAreaIndex (line 33) | int GetAreaIndex() const { return x0_areaIdx; }
        method GetDepth (line 34) | int GetDepth() const { return x4_depth; }
        method GetOutlineDrawDepth (line 35) | float GetOutlineDrawDepth() const { return x8_surfDrawDepth; }
        method GetSurfaceDrawDepth (line 36) | float GetSurfaceDrawDepth() const { return xc_outlineDrawDepth; }
      class CMapObjectSortInfo (line 39) | class CMapObjectSortInfo {
        type EObjectCode (line 47) | enum class EObjectCode { Invalid = -1, Object = 1 << 16, DoorSurfa...
        method CMapObjectSortInfo (line 49) | CMapObjectSortInfo(float zDist, int areaIdx, EObjectCode type, int...
        method u32 (line 58) | u32 GetLocalObjectIndex() const { return x8_typeAndIdx & 0xffff; }
        method EObjectCode (line 59) | EObjectCode GetObjectCode() const { return EObjectCode(x8_typeAndI...
        method u32 (line 60) | u32 GetAreaIndex() const { return x4_areaIdx; }
        method GetZDistance (line 61) | float GetZDistance() const { return x0_zDist; }
      class CMapAreaData (line 64) | class CMapAreaData {
        method Lock (line 71) | void Lock() { x0_area.Lock(); }
        method Unlock (line 72) | void Unlock() { x0_area.Unlock(); }
        method IsLoaded (line 73) | bool IsLoaded() const { return x0_area.IsLoaded(); }
        method CMapArea (line 74) | CMapArea* GetMapArea() { return x0_area.GetObj(); }
        method CMapArea (line 75) | const CMapArea* GetMapArea() const { return x0_area.GetObj(); }
        method CMapAreaData (line 76) | CMapAreaData* GetNextMapAreaData() { return x14_next; }
        method CMapAreaData (line 77) | const CMapAreaData* GetNextMapAreaData() const { return x14_next; }
        method EMapAreaList (line 78) | EMapAreaList GetContainingList() const { return x10_list; }
        method SetContainingList (line 79) | void SetContainingList(EMapAreaList list) { x10_list = list; }
        method SetNextMapArea (line 80) | void SetNextMapArea(CMapAreaData* next) { x14_next = next; }
      class CMapWorldDrawParms (line 83) | class CMapWorldDrawParms {
        method CMapWorldDrawParms (line 101) | CMapWorldDrawParms(float alphaSurfVisited, float alphaOlVisited, f...
        method IWorld (line 120) | const IWorld& GetWorld() const { return x24_wld; }
        method GetOutlineWidthScale (line 121) | float GetOutlineWidthScale() const { return x14_outlineWidthScale; }
        method GetHintAreaFlashIntensity (line 123) | float GetHintAreaFlashIntensity() const { return x30_hintFlashInte...
        method GetPlayerAreaFlashIntensity (line 124) | float GetPlayerAreaFlashIntensity() const { return x2c_playerFlash...
        method GetAlphaOutlineUnvisited (line 126) | float GetAlphaOutlineUnvisited() const { return xc_alphaOlUnvisite...
        method GetAlphaSurfaceUnvisited (line 127) | float GetAlphaSurfaceUnvisited() const { return x8_alphaSurfUnvisi...
        method GetAlphaOutlineVisited (line 128) | float GetAlphaOutlineVisited() const { return x4_alphaOlVisited; }
        method GetAlphaSurfaceVisited (line 129) | float GetAlphaSurfaceVisited() const { return x0_alphaSurfVisited; }
        method GetAlpha (line 130) | float GetAlpha() const { return x10_alpha; }
        method CMapWorldInfo (line 131) | const CMapWorldInfo& GetMapWorldInfo() const { return x28_mwInfo; }
        method CStateManager (line 132) | const CStateManager& GetStateManager() const { return x18_mgr; }
        method GetIsSortDoorSurfaces (line 133) | bool GetIsSortDoorSurfaces() const { return x38_sortDoorSurfs; }
        method GetObjectScale (line 134) | float GetObjectScale() const { return x34_objectScale; }
      method u32 (line 147) | u32 GetNumAreas() const { return x0_areas.size(); }
      method CMapArea (line 148) | CMapArea* GetMapArea(int aid) { return x0_areas[aid].GetMapArea(); }
      method CMapArea (line 149) | const CMapArea* GetMapArea(int aid) const { return x0_areas[aid].Get...

FILE: Runtime/AutoMapper/CMapWorldInfo.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/AutoMapper/CMapWorldInfo.hpp
  type metaforce (line 9) | namespace metaforce {
    class CWorldSaveGameInfo (line 10) | class CWorldSaveGameInfo
    class CMapWorldInfo (line 12) | class CMapWorldInfo {
      method CMapWorldInfo (line 21) | CMapWorldInfo() = default;
      method GetMapStationUsed (line 33) | bool GetMapStationUsed() const { return x38_mapStationUsed; }
      method SetMapStationUsed (line 34) | void SetMapStationUsed(bool isUsed) { x38_mapStationUsed = isUsed; }

FILE: Runtime/AutoMapper/CMappableObject.cpp
  type metaforce (line 11) | namespace metaforce {
    type SDrawData (line 16) | struct SDrawData {
    function CVector3f (line 245) | CVector3f CMappableObject::BuildSurfaceCenterPoint(int surfaceIdx) con...

FILE: Runtime/AutoMapper/CMappableObject.hpp
  type metaforce (line 10) | namespace metaforce {
    class CMapWorldInfo (line 11) | class CMapWorldInfo
    class CStateManager (line 12) | class CStateManager
    class CMappableObject (line 14) | class CMappableObject {
      type EMappableObjectType (line 16) | enum class EMappableObjectType {
      type EVisMode (line 44) | enum class EVisMode { Always, MapStationOrVisit, Visit, Never, MapSt...
      method CMappableObject (line 58) | CMappableObject(CMappableObject&&) = default;
      method EMappableObjectType (line 61) | EMappableObjectType GetType() const { return x0_type; }
      method IsDoorType (line 72) | static bool IsDoorType(EMappableObjectType type) {

FILE: Runtime/CArchitectureMessage.hpp
  type metaforce (line 9) | namespace metaforce {
    class CIOWin (line 10) | class CIOWin
    type EArchMsgTarget (line 12) | enum class EArchMsgTarget {
    type EArchMsgType (line 17) | enum class EArchMsgType {
    type IArchMsgParm (line 31) | struct IArchMsgParm {
    type CArchMsgParmInt32 (line 35) | struct CArchMsgParmInt32 : IArchMsgParm {
      method CArchMsgParmInt32 (line 37) | CArchMsgParmInt32(u32 parm) : x4_parm(parm) {}
    type CArchMsgParmVoidPtr (line 40) | struct CArchMsgParmVoidPtr : IArchMsgParm {
      method CArchMsgParmVoidPtr (line 42) | CArchMsgParmVoidPtr(void* parm1) : x4_parm1(parm1) {}
    type CArchMsgParmInt32Int32VoidPtr (line 45) | struct CArchMsgParmInt32Int32VoidPtr : IArchMsgParm {
      method CArchMsgParmInt32Int32VoidPtr (line 49) | CArchMsgParmInt32Int32VoidPtr(u32 parm1, u32 parm2, void* parm3)
    type CArchMsgParmInt32Int32IOWin (line 53) | struct CArchMsgParmInt32Int32IOWin : IArchMsgParm {
      method CArchMsgParmInt32Int32IOWin (line 57) | CArchMsgParmInt32Int32IOWin(u32 parm1, u32 parm2, std::shared_ptr<CI...
    type CArchMsgParmNull (line 61) | struct CArchMsgParmNull : IArchMsgParm {}
    type CArchMsgParmReal32 (line 63) | struct CArchMsgParmReal32 : IArchMsgParm {
      method CArchMsgParmReal32 (line 65) | CArchMsgParmReal32(float parm) : x4_parm(parm) {}
    type CArchMsgParmUserInput (line 68) | struct CArchMsgParmUserInput : IArchMsgParm {
      method CArchMsgParmUserInput (line 70) | CArchMsgParmUserInput(const CFinalInput& parm) : x4_parm(parm) {}
    type CArchMsgParmControllerStatus (line 73) | struct CArchMsgParmControllerStatus : IArchMsgParm {
      method CArchMsgParmControllerStatus (line 76) | CArchMsgParmControllerStatus(u16 a, bool b) : x4_parm1(a), x6_parm2(...
    class CArchitectureMessage (line 79) | class CArchitectureMessage {
      method CArchitectureMessage (line 85) | CArchitectureMessage(EArchMsgTarget target, EArchMsgType type, std::...
      method EArchMsgTarget (line 88) | EArchMsgTarget GetTarget() const { return x0_target; }
      method EArchMsgType (line 89) | EArchMsgType GetType() const { return x4_type; }
      method T (line 91) | const T* GetParm() const {
    class MakeMsg (line 96) | class MakeMsg {
      method CArchitectureMessage (line 98) | static CArchitectureMessage CreateQuitGameplay(EArchMsgTarget target) {
      method CArchitectureMessage (line 101) | static CArchitectureMessage CreateControllerStatus(EArchMsgTarget ta...
      method CArchMsgParmInt32 (line 105) | static const CArchMsgParmInt32& GetParmNewGameflowState(const CArchi...
      method CArchMsgParmUserInput (line 108) | static const CArchMsgParmUserInput& GetParmUserInput(const CArchitec...
      method CArchitectureMessage (line 111) | static CArchitectureMessage CreateUserInput(EArchMsgTarget target, c...
      method CArchMsgParmReal32 (line 114) | static const CArchMsgParmReal32& GetParmTimerTick(const CArchitectur...
      method CArchitectureMessage (line 117) | static CArchitectureMessage CreateTimerTick(EArchMsgTarget target, f...
      method CArchMsgParmInt32Int32VoidPtr (line 120) | static const CArchMsgParmInt32Int32VoidPtr& GetParmChangeIOWinPriori...
      method CArchMsgParmInt32Int32IOWin (line 123) | static const CArchMsgParmInt32Int32IOWin& GetParmCreateIOWin(const C...
      method CArchitectureMessage (line 126) | static CArchitectureMessage CreateCreateIOWin(EArchMsgTarget target,...
      method CArchMsgParmVoidPtr (line 131) | static const CArchMsgParmVoidPtr& GetParmDeleteIOWin(const CArchitec...
      method CArchitectureMessage (line 134) | static CArchitectureMessage CreateFrameBegin(EArchMsgTarget target, ...
      method CArchitectureMessage (line 137) | static CArchitectureMessage CreateFrameEnd(EArchMsgTarget target, s3...
      method CArchitectureMessage (line 141) | static CArchitectureMessage CreateRemoveAllIOWins(EArchMsgTarget tar...

FILE: Runtime/CArchitectureQueue.hpp
  type metaforce (line 6) | namespace metaforce {
    class CArchitectureQueue (line 8) | class CArchitectureQueue {
      method Push (line 12) | void Push(CArchitectureMessage&& msg) { m_list.push_back(std::move(m...
      method CArchitectureMessage (line 13) | CArchitectureMessage Pop() {
      method Clear (line 18) | void Clear() { m_list.clear(); }

FILE: Runtime/CBasics.hpp
  type _stat64 (line 11) | struct _stat64
  type metaforce (line 16) | namespace metaforce {
    type OSCalendarTime (line 20) | struct OSCalendarTime {
    class CBasics (line 34) | class CBasics {
      type ::_stat64 (line 37) | struct ::_stat64
      type stat (line 39) | struct stat
      method OSTime (line 50) | static OSTime GetTime() { return ToWiiTime(std::chrono::system_clock...
      method u64 (line 52) | static constexpr u64 GetGCTicksPerSec() { return 486000000ull; }
      method OSCalendarTime (line 54) | static OSCalendarTime ToCalendarTime(OSTime time) { return ToCalenda...

FILE: Runtime/CBasicsPC.cpp
  type metaforce (line 46) | namespace metaforce {
    function u64 (line 59) | u64 CBasics::GetGCTicks() {
    type tm (line 81) | struct tm
    type tm (line 81) | struct tm
    type tm (line 89) | struct tm
    function OSTime (line 99) | OSTime CBasics::ToWiiTime(std::chrono::system_clock::time_point time) {
    type tm (line 119) | struct tm
    type tm (line 121) | struct tm
    function OSCalendarTime (line 130) | OSCalendarTime CBasics::ToCalendarTime(std::chrono::system_clock::time...
    function u16 (line 158) | u16 CBasics::SwapBytes(u16 v) {
    function u32 (line 163) | u32 CBasics::SwapBytes(u32 v) {
    function u64 (line 168) | u64 CBasics::SwapBytes(u64 v) {
    function s16 (line 173) | s16 CBasics::SwapBytes(s16 v) {
    function s32 (line 178) | s32 CBasics::SwapBytes(s32 v) {
    function s64 (line 183) | s64 CBasics::SwapBytes(s64 v) {

FILE: Runtime/CCRC32.cpp
  type metaforce (line 5) | namespace metaforce {
    function permute (line 39) | constexpr uint32_t permute(uint32_t checksum, uint8_t b) { return (che...

FILE: Runtime/CCRC32.hpp
  type metaforce (line 5) | namespace metaforce {
    class CCRC32 (line 7) | class CCRC32 {

FILE: Runtime/CDependencyGroup.cpp
  type metaforce (line 4) | namespace metaforce {
    function CFactoryFnReturn (line 14) | CFactoryFnReturn FDependencyGroupFactory([[maybe_unused]] const SObjec...

FILE: Runtime/CDependencyGroup.hpp
  type metaforce (line 6) | namespace metaforce {
    class CDependencyGroup (line 7) | class CDependencyGroup {

FILE: Runtime/CDvdFile.cpp
  type metaforce (line 16) | namespace metaforce {
    type SDLDiscStreamCtx (line 19) | struct SDLDiscStreamCtx {
    function sdlStreamReadAt (line 23) | int64_t sdlStreamReadAt(void* userData, uint64_t offset, void* out, si...
    function sdlStreamLen (line 45) | int64_t sdlStreamLen(void* userData) {
    function sdlStreamClose (line 54) | void sdlStreamClose(void* userData) {
    function u32 (line 65) | u32 nodReadLoop(NodHandle* reader, void* buf, u32 len) {
    class CFileDvdRequest (line 94) | class CFileDvdRequest : public IDvdRequest {
      method WaitUntilComplete (line 112) | void WaitUntilComplete() override {
      method IsComplete (line 118) | bool IsComplete() override {
      method PostCancelRequest (line 125) | void PostCancelRequest() override { m_cancel = true; }
      method EMediaType (line 127) | [[nodiscard]] EMediaType GetMediaType() const override { return EMed...
      method CFileDvdRequest (line 129) | CFileDvdRequest(CDvdFile& file, void* buf, u32 len, ESeekOrigin when...
      method DoRequest (line 139) | void DoRequest() {
    function u32 (line 223) | u32 CDvdFile::SyncSeekRead(void* buf, u32 len, ESeekOrigin whence, int...
    function u32 (line 253) | u32 CDvdFile::SyncRead(void* buf, u32 len) {
    type SDirFrame (line 309) | struct SDirFrame {
    type SFstBuildContext (line 314) | struct SFstBuildContext {
    function SDiscInfo (line 452) | SDiscInfo CDvdFile::DiscInfo() {

FILE: Runtime/CDvdFile.hpp
  type metaforce (line 21) | namespace metaforce {
    type ESeekOrigin (line 23) | enum class ESeekOrigin { Begin = 0, Cur = 1, End = 2 }
    type DVDFileInfo (line 25) | struct DVDFileInfo
    class IDvdRequest (line 26) | class IDvdRequest
    type SDiscInfo (line 28) | struct SDiscInfo {
    class CDvdFile (line 34) | class CDvdFile {
      type SFileEntry (line 38) | struct SFileEntry {
      method GetLastError (line 65) | static std::string_view GetLastError() { return m_lastError; }
      method u8 (line 69) | static u8* GetDolBuf() { return m_dolBuf.get(); }
      method GetDolBufLen (line 70) | static size_t GetDolBufLen() { return m_dolBufLen; }
      method UpdateFilePos (line 75) | void UpdateFilePos(int pos) {
      method FileExists (line 80) | static bool FileExists(std::string_view path) { return ResolvePath(p...
      method CloseFile (line 81) | void CloseFile() { m_reader.reset(); }
      method AsyncRead (line 85) | std::shared_ptr<IDvdRequest> AsyncRead(void* buf, u32 len, std::func...
      method u64 (line 89) | u64 Length() const { return m_size; }
      method GetPath (line 90) | std::string_view GetPath() const { return x18_path; }

FILE: Runtime/CDvdRequest.hpp
  type metaforce (line 3) | namespace metaforce {
    class IDvdRequest (line 5) | class IDvdRequest {
      type EMediaType (line 13) | enum class EMediaType { ARAM = 0, Real = 1, File = 2, NOD = 3 }

FILE: Runtime/CFactoryMgr.cpp
  type metaforce (line 12) | namespace metaforce {
    function CFactoryFnReturn (line 22) | CFactoryFnReturn CFactoryMgr::MakeObject(const SObjectTag& tag, metafo...
    function CFactoryFnReturn (line 36) | CFactoryFnReturn CFactoryMgr::MakeObjectFromMemory(const SObjectTag& t...
    function FourCC (line 88) | FourCC CFactoryMgr::TypeIdxToFourCC(ETypeTable fcc) { return TypeTable...

FILE: Runtime/CFactoryMgr.hpp
  type metaforce (line 9) | namespace metaforce {
    type SObjectTag (line 10) | struct SObjectTag
    class CVParamTransfer (line 11) | class CVParamTransfer
    class IObj (line 12) | class IObj
    class CFactoryMgr (line 14) | class CFactoryMgr {
      method AddFactory (line 24) | void AddFactory(FourCC key, FFactoryFunc func) { x10_factories.inser...
      method AddFactory (line 25) | void AddFactory(FourCC key, FMemFactoryFunc func) { x24_memFactories...
      type ETypeTable (line 27) | enum class ETypeTable : u8 {

FILE: Runtime/CGameAllocator.cpp
  type metaforce (line 4) | namespace metaforce {
    function u8 (line 9) | u8* CGameAllocator::Alloc(size_t len) {

FILE: Runtime/CGameAllocator.hpp
  type metaforce (line 9) | namespace metaforce {
    class CGameAllocator (line 10) | class CGameAllocator {
      type SAllocationDescription (line 11) | struct SAllocationDescription {
      type SChunkDescription (line 17) | struct SChunkDescription {

FILE: Runtime/CGameDebug.hpp
  type metaforce (line 5) | namespace metaforce {
    type CFinalInput (line 6) | struct CFinalInput
    type EDebugMenu (line 10) | enum class EDebugMenu {}
    type EDebugOptions (line 12) | enum class EDebugOptions {}
    type EDebugMainMenu (line 14) | enum class EDebugMainMenu {}
    class CDebugOption (line 16) | class CDebugOption {
    class CGameDebug (line 22) | class CGameDebug {
      type EReturnValue (line 24) | enum class EReturnValue {}

FILE: Runtime/CGameHintInfo.cpp
  type metaforce (line 7) | namespace metaforce {
    function CFactoryFnReturn (line 42) | CFactoryFnReturn FHintFactory(const SObjectTag&, CInputStream& in, con...

FILE: Runtime/CGameHintInfo.hpp
  type metaforce (line 9) | namespace metaforce {
    class CGameHintInfo (line 10) | class CGameHintInfo {
      type SHintLocation (line 12) | struct SHintLocation {
      class CGameHint (line 20) | class CGameHint {
        method GetNormalTime (line 31) | float GetNormalTime() const { return x14_normalTime; }
        method GetImmediateTime (line 32) | float GetImmediateTime() const { return x10_immediateTime; }
        method GetTextTime (line 33) | float GetTextTime() const { return x1c_textTime; }
        method GetName (line 34) | std::string_view GetName() const { return x0_name; }
        method CAssetId (line 35) | CAssetId GetStringID() const { return x18_stringId; }

FILE: Runtime/CGameOptions.cpp
  type metaforce (line 19) | namespace metaforce {
    function u32 (line 708) | u32 CHintOptions::GetNextHintIdx() const {

FILE: Runtime/CGameOptions.hpp
  type metaforce (line 11) | namespace metaforce {
    type CFinalInput (line 12) | struct CFinalInput
    class CStateManager (line 13) | class CStateManager
    type EGameOption (line 16) | enum class EGameOption {
    type EOptionType (line 35) | enum class EOptionType { Float, DoubleEnum, TripleEnum, RestoreDefaults }
    type SGameOption (line 38) | struct SGameOption {
    class CPersistentOptions (line 50) | class CPersistentOptions {
      method CPersistentOptions (line 68) | CPersistentOptions() = default;
      method u32 (line 73) | u32 GetAutoMapperKeyState() const { return xbc_autoMapperKeyState; }
      method SetAutoMapperKeyState (line 74) | void SetAutoMapperKeyState(u32 state) { xbc_autoMapperKeyState = sta...
      method GetPlayerLinkedFusion (line 75) | bool GetPlayerLinkedFusion() const { return xd0_24_fusionLinked; }
      method SetPlayerLinkedFusion (line 76) | void SetPlayerLinkedFusion(bool fusionLinked) { xd0_24_fusionLinked ...
      method GetPlayerBeatNormalMode (line 77) | bool GetPlayerBeatNormalMode() const { return xd0_25_normalModeBeat; }
      method SetPlayerBeatNormalMode (line 78) | void SetPlayerBeatNormalMode(bool normalModeBeat) { xd0_25_normalMod...
      method GetPlayerBeatHardMode (line 79) | bool GetPlayerBeatHardMode() const { return xd0_26_hardModeBeat; }
      method SetPlayerBeatHardMode (line 80) | void SetPlayerBeatHardMode(bool hardModeBeat) { xd0_26_hardModeBeat ...
      method GetPlayerBeatFusion (line 81) | bool GetPlayerBeatFusion() const { return xd0_27_fusionBeat; }
      method SetPlayerBeatFusion (line 82) | void SetPlayerBeatFusion(bool fusionBeat) { xd0_27_fusionBeat = fusi...
      method GetPlayerFusionSuitActive (line 83) | bool GetPlayerFusionSuitActive() const { return xd0_28_fusionSuitAct...
      method SetPlayerFusionSuitActive (line 84) | void SetPlayerFusionSuitActive(bool fusionSuitActive) { xd0_28_fusio...
      method GetAllItemsCollected (line 85) | bool GetAllItemsCollected() const { return xd0_29_allItemsCollected; }
      method SetAllItemsCollected (line 86) | void SetAllItemsCollected(bool allItemsCollected) { xd0_29_allItemsC...
      method u32 (line 87) | u32 GetLogScanPercent() const { return xcc_logScanPercent; }
      method SetLogScanPercent (line 88) | void SetLogScanPercent(u32 percent) { xcc_logScanPercent = percent; }
      method IncrementFrozenFpsCount (line 89) | void IncrementFrozenFpsCount() { xc0_frozenFpsCount = std::min(int(x...
      method GetShowFrozenFpsMessage (line 90) | bool GetShowFrozenFpsMessage() const { return xc0_frozenFpsCount != ...
      method IncrementFrozenBallCount (line 91) | void IncrementFrozenBallCount() { xc4_frozenBallCount = std::min(int...
      method GetShowFrozenBallMessage (line 92) | bool GetShowFrozenBallMessage() const { return xc4_frozenBallCount !...
      method GetShowPowerBombAmmoMessage (line 93) | bool GetShowPowerBombAmmoMessage() const { return xc8_powerBombAmmoC...
      method IncrementPowerBombAmmoCount (line 94) | void IncrementPowerBombAmmoCount() { xc8_powerBombAmmoCount = std::m...
      method u8 (line 98) | u8* GetNESState() { return x0_nesState.data(); }
      method u8 (line 99) | const u8* GetNESState() const { return x0_nesState.data(); }
    class CGameOptions (line 103) | class CGameOptions {
      method s32 (line 133) | s32 GetScreenBrightness() const { return x48_screenBrightness; }
      method s32 (line 136) | s32 GetGamma() const { return m_gamma; }
      method s32 (line 138) | s32 GetScreenPositionX() const { return x4c_screenXOffset; }
      method s32 (line 140) | s32 GetScreenPositionY() const { return x50_screenYOffset; }
      method s32 (line 142) | s32 GetScreenStretch() const { return x54_screenStretch; }
      method s32 (line 144) | s32 GetSfxVolume() const { return x58_sfxVol; }
      method s32 (line 146) | s32 GetMusicVolume() const { return x5c_musicVol; }
      method u32 (line 148) | u32 GetHUDAlpha() const { return x60_hudAlpha; }
      method u32 (line 150) | u32 GetHelmetAlpha() const { return x64_helmetAlpha; }
      method GetHUDLag (line 152) | bool GetHUDLag() const { return x68_24_hudLag; }
      method GetInvertYAxis (line 156) | bool GetInvertYAxis() const { return x68_25_invertY; }
      method GetIsRumbleEnabled (line 158) | bool GetIsRumbleEnabled() const { return x68_26_rumble; }
      method GetSwapBeamControls (line 160) | bool GetSwapBeamControls() const { return x68_27_swapBeamsControls; }
      method GetIsHintSystemEnabled (line 162) | bool GetIsHintSystemEnabled() const { return x68_28_hintSystem; }
    class CHintOptions (line 172) | class CHintOptions {
      type EHintState (line 174) | enum class EHintState { Zero, Waiting, Displaying, Delayed }
      type SHintState (line 175) | struct SHintState {
        method SHintState (line 180) | SHintState() = default;
        method SHintState (line 181) | SHintState(EHintState state, float time, bool flag) : x0_state(sta...
        method CanContinue (line 183) | bool CanContinue() const { return x4_time / 3.f <= 1.f; }
      method CHintOptions (line 191) | CHintOptions() = default;

FILE: Runtime/CGameState.cpp
  type metaforce (line 12) | namespace metaforce {
    function CWorldState (line 254) | CWorldState& CGameState::StateForWorld(CAssetId mlvlId) {

FILE: Runtime/CGameState.hpp
  type metaforce (line 15) | namespace metaforce {
    class CSaveWorldMemory (line 16) | class CSaveWorldMemory
    class WordBitmap (line 18) | class WordBitmap {
      method Reserve (line 23) | void Reserve(size_t bitCount) { x0_words.reserve((bitCount + 31) / 3...
      method GetBitCount (line 24) | [[nodiscard]] size_t GetBitCount() const { return x10_bitCount; }
      method GetBit (line 25) | [[nodiscard]] bool GetBit(size_t idx) const {
      method SetBit (line 33) | void SetBit(size_t idx) {
      method UnsetBit (line 42) | void UnsetBit(size_t idx) {
      method Clear (line 51) | void Clear() {
      class Iterator (line 56) | class Iterator {
        method Iterator (line 60) | Iterator(const WordBitmap& bmp, size_t idx) : m_bmp(bmp), m_idx(id...
        method Iterator (line 69) | Iterator& operator++() {
      method Iterator (line 76) | [[nodiscard]] Iterator begin() const { return Iterator(*this, 0); }
        method Iterator (line 60) | Iterator(const WordBitmap& bmp, size_t idx) : m_bmp(bmp), m_idx(id...
        method Iterator (line 69) | Iterator& operator++() {
      method Iterator (line 77) | [[nodiscard]] Iterator end() const { return Iterator(*this, x10_bitC...
        method Iterator (line 60) | Iterator(const WordBitmap& bmp, size_t idx) : m_bmp(bmp), m_idx(id...
        method Iterator (line 69) | Iterator& operator++() {
    class CScriptLayerManager (line 80) | class CScriptLayerManager {
      method CScriptLayerManager (line 86) | CScriptLayerManager() = default;
      method IsLayerActive (line 89) | [[nodiscard]] bool IsLayerActive(int areaIdx, int layerIdx) const {
      method SetLayerActive (line 93) | void SetLayerActive(int areaIdx, int layerIdx, bool active) {
      method u32 (line 103) | [[nodiscard]] u32 GetAreaLayerCount(int areaIdx) const { return x0_a...
      method u32 (line 104) | [[nodiscard]] u32 GetAreaCount() const { return x0_areaLayers.size(); }
    class CWorldState (line 109) | class CWorldState {
      method CAssetId (line 120) | CAssetId GetWorldAssetId() const { return x0_mlvlId; }
      method SetAreaId (line 121) | void SetAreaId(TAreaId aid) { x4_areaId = aid; }
      method TAreaId (line 122) | TAreaId GetCurrentAreaId() const { return x4_areaId; }
      method CAssetId (line 123) | CAssetId GetDesiredAreaAssetId() const { return x10_desiredAreaAsset...
      method SetDesiredAreaAssetId (line 124) | void SetDesiredAreaAssetId(CAssetId id) { x10_desiredAreaAssetId = i...
    class CGameState (line 131) | class CGameState {
      method GetPlayerState (line 154) | std::shared_ptr<CPlayerState> GetPlayerState() const { return x98_pl...
      method GetWorldTransitionManager (line 155) | std::shared_ptr<CWorldTransManager> GetWorldTransitionManager() cons...
      method GetTotalPlayTime (line 157) | double GetTotalPlayTime() const { return xa0_playTime; }
      method CPersistentOptions (line 158) | CPersistentOptions& SystemOptions() { return xa8_systemOptions; }
      method CGameOptions (line 159) | CGameOptions& GameOptions() { return x17c_gameOptions; }
      method CHintOptions (line 160) | CHintOptions& HintOptions() { return x1f8_hintOptions; }
      method CWorldState (line 162) | CWorldState& CurrentWorldState() { return StateForWorld(x84_mlvlId); }
      method CAssetId (line 163) | CAssetId CurrentWorldAssetId() const { return x84_mlvlId; }
      method SetHardMode (line 164) | void SetHardMode(bool v) { x228_24_hardMode = v; }
      method GetHardMode (line 165) | bool GetHardMode() const { return x228_24_hardMode; }
      method SetPersistentOptions (line 167) | void SetPersistentOptions(const CPersistentOptions& opts) { xa8_syst...
      method SetGameOptions (line 170) | void SetGameOptions(const CGameOptions& opts) { x17c_gameOptions = o...
      method u32 (line 173) | u32 GetFileIdx() const { return x20c_saveFileIdx; }
      method SetFileIdx (line 174) | void SetFileIdx(u32 idx) { x20c_saveFileIdx = idx; }
      method SetCardSerial (line 175) | void SetCardSerial(u64 serial) { x210_cardSerial = serial; }
      method u64 (line 176) | u64 GetCardSerial() const { return x210_cardSerial; }
      type GameFileStateInfo (line 183) | struct GameFileStateInfo {

FILE: Runtime/CIOWin.hpp
  type metaforce (line 9) | namespace metaforce {
    class CArchitectureMessage (line 10) | class CArchitectureMessage
    class CArchitectureQueue (line 11) | class CArchitectureQueue
    class CIOWin (line 13) | class CIOWin {
      type EMessageReturn (line 18) | enum class EMessageReturn { Normal = 0, Exit = 1, RemoveIOWinAndExit...
      method CIOWin (line 19) | explicit CIOWin(std::string_view name) : x4_name(name) { m_nameHash ...
      method GetIsContinueDraw (line 23) | virtual bool GetIsContinueDraw() const { return true; }
      method Draw (line 24) | virtual void Draw() {}
      method PreDraw (line 25) | virtual void PreDraw() {}
      method GetName (line 27) | std::string_view GetName() const { return x4_name; }
      method GetNameHash (line 28) | size_t GetNameHash() const { return m_nameHash; }

FILE: Runtime/CIOWinManager.cpp
  type metaforce (line 6) | namespace metaforce {
    function CIOWin (line 104) | CIOWin* CIOWinManager::FindIOWin(std::string_view name) {

FILE: Runtime/CIOWinManager.hpp
  type metaforce (line 10) | namespace metaforce {
    class CIOWinManager (line 12) | class CIOWinManager {
      type IOWinPQNode (line 13) | struct IOWinPQNode {
        method IOWinPQNode (line 17) | IOWinPQNode(std::weak_ptr<CIOWin> iowin, int prio, CIOWinManager::...
        method ShareIOWin (line 19) | std::shared_ptr<CIOWin> ShareIOWin() const { return std::shared_pt...
        method CIOWin (line 20) | CIOWin* GetIOWin() const { return x0_iowin.get(); }
      method IsEmpty (line 37) | bool IsEmpty() const { return x0_drawRoot == nullptr && x4_pumpRoot ...

FILE: Runtime/CInGameTweakManagerBase.hpp
  type metaforce (line 10) | namespace metaforce {
    class CTweakValue (line 12) | class CTweakValue {
      type Audio (line 14) | struct Audio {
        method Audio (line 18) | Audio() = default;
        method Audio (line 19) | Audio(float fadeIn, float fadeOut, float vol, std::string_view fil...
        method GetFadeIn (line 21) | float GetFadeIn() const { return x0_fadeIn; }
        method GetFadeOut (line 22) | float GetFadeOut() const { return x4_fadeOut; }
        method GetVolume (line 23) | float GetVolume() const { return x8_volume; }
        method GetFileName (line 24) | std::string_view GetFileName() const { return xc_fileName; }
        method CAssetId (line 25) | CAssetId GetResId() const { return x1c_res; }
        method Audio (line 26) | static Audio None() { return Audio{0.f, 0.f, 0.f, "", 0}; }
      type EType (line 28) | enum class EType {}
      method CTweakValue (line 41) | CTweakValue() = default;
      method GetName (line 44) | std::string_view GetName() const { return x4_key; }
      method Audio (line 47) | const Audio& GetAudio() const { return x24_audio; }
        method Audio (line 18) | Audio() = default;
        method Audio (line 19) | Audio(float fadeIn, float fadeOut, float vol, std::string_view fil...
        method GetFadeIn (line 21) | float GetFadeIn() const { return x0_fadeIn; }
        method GetFadeOut (line 22) | float GetFadeOut() const { return x4_fadeOut; }
        method GetVolume (line 23) | float GetVolume() const { return x8_volume; }
        method GetFileName (line 24) | std::string_view GetFileName() const { return xc_fileName; }
        method CAssetId (line 25) | CAssetId GetResId() const { return x1c_res; }
        method Audio (line 26) | static Audio None() { return Audio{0.f, 0.f, 0.f, "", 0}; }
      method EType (line 48) | EType GetType() const { return x0_type; }
    class CInGameTweakManagerBase (line 51) | class CInGameTweakManagerBase {
      method HasTweakValue (line 56) | bool HasTweakValue(std::string_view name) const {
      method CTweakValue (line 61) | const CTweakValue* GetTweakValue(std::string_view name) const {
      method ReadFromMemoryCard (line 70) | bool ReadFromMemoryCard(std::string_view name) { return true; }
      method GetIdentifierForMidiEvent (line 72) | static std::string GetIdentifierForMidiEvent(CAssetId world, CAssetI...

FILE: Runtime/CInfiniteLoopDetector.cpp
  type metaforce (line 4) | namespace metaforce {

FILE: Runtime/CInfiniteLoopDetector.hpp
  type metaforce (line 7) | namespace metaforce {
    class CInfiniteLoopDetector (line 8) | class CInfiniteLoopDetector {

FILE: Runtime/CMFGameBase.hpp
  type metaforce (line 5) | namespace metaforce {
    class CMFGameBase (line 7) | class CMFGameBase : public CIOWin {
      method CMFGameBase (line 9) | explicit CMFGameBase(const char* name) : CIOWin(name) {}
    class CMFGameLoaderBase (line 12) | class CMFGameLoaderBase : public CIOWin {
      method CMFGameLoaderBase (line 14) | explicit CMFGameLoaderBase(const char* name) : CIOWin(name) {}

FILE: Runtime/CMain.cpp
  class Limiter (line 47) | class Limiter {
    method Reset (line 52) | void Reset() { m_oldTime = delta_clock::now(); }
    method Sleep (line 54) | void Sleep(duration_t targetFrameTime) {
    method duration_t (line 72) | duration_t SleepTime(duration_t targetFrameTime) {
    method duration_t (line 87) | duration_t TimeSince(delta_clock::time_point start) {
    method NanoSleep (line 92) | void NanoSleep(const duration_t duration) {
    method NanoSleep (line 123) | void NanoSleep(const duration_t duration) { std::this_thread::sleep_fo...
  type metaforce (line 129) | namespace metaforce {
    function CPUFeatureString (line 133) | static std::string CPUFeatureString(const zeus::CPUInfo& cpuInf) {
    type Application (line 165) | struct Application {
      method Application (line 193) | Application(int argc, char** argv, FileStoreManager& fileMgr, CVarMa...
      method onAppLaunched (line 203) | void onAppLaunched(const AuroraInfo& info) noexcept {
      method initialize (line 229) | void initialize() {
      method onSdlEvent (line 238) | void onSdlEvent(const SDL_Event& event) noexcept {
      method onAppIdle (line 262) | bool onAppIdle(float realDt) noexcept {
      method onAppDraw (line 371) | void onAppDraw() noexcept {
      method onAppPostDraw (line 383) | void onAppPostDraw() noexcept {
      method onAppWindowResized (line 394) | void onAppWindowResized(const AuroraWindowSize& size) noexcept {
      method onAppWindowMoved (line 402) | void onAppWindowMoved(const AuroraWindowPos& pos) {
      method onAppDisplayScaleChanged (line 409) | void onAppDisplayScaleChanged(float scale) noexcept { ImGuiEngine_In...
      method onControllerAdded (line 411) | void onControllerAdded(uint32_t which) noexcept { m_imGuiConsole.Con...
      method onControllerRemoved (line 413) | void onControllerRemoved(uint32_t which) noexcept { m_imGuiConsole.C...
      method onAppExiting (line 415) | void onAppExiting() noexcept {
      method onImGuiInit (line 431) | void onImGuiInit(float scale) noexcept { ImGuiEngine_Initialize(scal...
      method onImGuiAddTextures (line 433) | void onImGuiAddTextures() noexcept { ImGuiEngine_AddTextures(); }
      method getTargetFrameTime (line 435) | [[nodiscard]] std::chrono::nanoseconds getTargetFrameTime() const {
  function SetupBasics (line 445) | static void SetupBasics() {
  function IsClientLoggingEnabled (line 479) | static bool IsClientLoggingEnabled(int argc, char** argv) {
  function aurora_log_callback (line 495) | static void aurora_log_callback(AuroraLogLevel level, const char* module...
  function aurora_imgui_init_callback (line 523) | static void aurora_imgui_init_callback(const AuroraWindowSize* size) { g...
  function main (line 526) | int main(int argc, char** argv) {

FILE: Runtime/CMainFlowBase.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/CMainFlowBase.hpp
  type metaforce (line 5) | namespace metaforce {
    type EClientFlowStates (line 7) | enum class EClientFlowStates {
    class CMainFlowBase (line 22) | class CMainFlowBase : public CIOWin {
      method CMainFlowBase (line 27) | explicit CMainFlowBase(const char* name) : CIOWin(name) {}

FILE: Runtime/CMayaSpline.cpp
  type metaforce (line 5) | namespace metaforce {
    function ValidateTangent (line 6) | void ValidateTangent(zeus::CVector2f& tangent) {

FILE: Runtime/CMayaSpline.hpp
  type metaforce (line 11) | namespace metaforce {
    class CMayaSplineKnot (line 12) | class CMayaSplineKnot {
      method GetTime (line 25) | float GetTime() const { return x0_time; }
      method GetAmplitude (line 26) | float GetAmplitude() const { return x4_amplitude; }
      method u8 (line 27) | u8 GetX8() const { return x8_; }
      method u8 (line 28) | u8 GetX9() const { return x9_; }
    class CMayaSpline (line 33) | class CMayaSpline {
      method u32 (line 48) | u32 GetKnotCount() const { return x8_knots.size(); }

FILE: Runtime/CMemoryCardSys.cpp
  type metaforce (line 12) | namespace metaforce {
    function CSaveWorldMemory (line 67) | const CSaveWorldMemory& CMemoryCardSys::GetSaveWorldMemory(CAssetId wl...
    function u32 (line 184) | u32 CMemoryCardSys::CCardFileInfo::CalculateBannerDataSize() const {
    function u32 (line 211) | u32 CMemoryCardSys::CCardFileInfo::CalculateTotalDataSize() const {
    function ECardResult (line 271) | ECardResult CMemoryCardSys::CCardFileInfo::PumpCardTransfer() {
    function ECardResult (line 297) | ECardResult CMemoryCardSys::CCardFileInfo::GetStatus(kabufuda::CardSta...
    function ECardResult (line 334) | ECardResult CMemoryCardSys::CCardFileInfo::CreateFile() {
    function ECardResult (line 338) | ECardResult CMemoryCardSys::CCardFileInfo::WriteFile() {
    function ECardResult (line 345) | ECardResult CMemoryCardSys::CCardFileInfo::CloseFile() { return CMemor...
    function ECardResult (line 367) | ECardResult CMemoryCardSys::MountCard(kabufuda::ECardSlot port) {
    function ECardResult (line 378) | ECardResult CMemoryCardSys::UnmountCard(kabufuda::ECardSlot port) {
    function ECardResult (line 389) | ECardResult CMemoryCardSys::CheckCard(kabufuda::ECardSlot port) {
    function ECardResult (line 396) | ECardResult CMemoryCardSys::CreateFile(kabufuda::ECardSlot port, const...
    function ECardResult (line 408) | ECardResult CMemoryCardSys::OpenFile(kabufuda::ECardSlot port, const c...
    function ECardResult (line 420) | ECardResult CMemoryCardSys::FastOpenFile(kabufuda::ECardSlot port, int...
    function ECardResult (line 432) | ECardResult CMemoryCardSys::CloseFile(CardFileHandle& info) {
    function ECardResult (line 442) | ECardResult CMemoryCardSys::ReadFile(CardFileHandle& info, void* buf, ...
    function ECardResult (line 454) | ECardResult CMemoryCardSys::WriteFile(CardFileHandle& info, const void...
    function ECardResult (line 466) | ECardResult CMemoryCardSys::GetNumFreeBytes(kabufuda::ECardSlot port, ...
    function ECardResult (line 477) | ECardResult CMemoryCardSys::GetSerialNo(kabufuda::ECardSlot port, u64&...
    function ECardResult (line 488) | ECardResult CMemoryCardSys::GetResultCode(kabufuda::ECardSlot port) {
    function ECardResult (line 493) | ECardResult CMemoryCardSys::GetStatus(kabufuda::ECardSlot port, int fi...
    function ECardResult (line 504) | ECardResult CMemoryCardSys::SetStatus(kabufuda::ECardSlot port, int fi...
    function ECardResult (line 515) | ECardResult CMemoryCardSys::DeleteFile(kabufuda::ECardSlot port, const...
    function ECardResult (line 526) | ECardResult CMemoryCardSys::FastDeleteFile(kabufuda::ECardSlot port, i...
    function ECardResult (line 537) | ECardResult CMemoryCardSys::Rename(kabufuda::ECardSlot port, const cha...
    function ECardResult (line 548) | ECardResult CMemoryCardSys::FormatCard(kabufuda::ECardSlot port) {

FILE: Runtime/CMemoryCardSys.hpp
  type metaforce (line 18) | namespace metaforce {
    class CDummyWorld (line 19) | class CDummyWorld
    class CSimplePool (line 20) | class CSimplePool
    class CStringTable (line 21) | class CStringTable
    class CSaveWorldMemory (line 23) | class CSaveWorldMemory {
      method CAssetId (line 34) | CAssetId GetWorldNameId() const { return x0_strgId; }
      method CAssetId (line 35) | CAssetId GetSaveWorldAssetId() const { return x4_savwId; }
      method u32 (line 36) | u32 GetAreaCount() const { return x8_areaCount; }
    class CSaveWorldIntermediate (line 47) | class CSaveWorldIntermediate {
    class CMemoryCardSys (line 63) | class CMemoryCardSys {
      type CardResult (line 79) | struct CardResult {
        method CardResult (line 81) | CardResult(ECardResult res) : result(res) {}
      type CardFileHandle (line 86) | struct CardFileHandle {
        method CardFileHandle (line 89) | CardFileHandle(kabufuda::ECardSlot slot) : slot(slot) {}
        method getFileNo (line 90) | int getFileNo() const { return handle.getFileNo(); }
      method u32 (line 99) | u32 GetScanCategoryCount(CWorldSaveGameInfo::EScanCategory cat) cons...
      method LookupScanState (line 101) | std::vector<std::pair<CAssetId, CWorldSaveGameInfo::EScanCategory>>:...
      type CCardFileInfo (line 113) | struct CCardFileInfo {
        type Icon (line 114) | struct Icon {
        type EStatus (line 121) | enum class EStatus { Standby, Transferring, Done }
        method CCardFileInfo (line 134) | CCardFileInfo(kabufuda::ECardSlot port, std::string_view name) : m...
        method GetCardPort (line 139) | [[nodiscard]] kabufuda::ECardSlot GetCardPort() const { return m_h...
        method GetFileNo (line 140) | [[nodiscard]] int GetFileNo() const { return m_handle.getFileNo(); }
        method SetComment (line 146) | void SetComment(const std::string& c) { x28_comment = c; }
        method CMemoryStreamOut (line 153) | CMemoryStreamOut BeginMemoryOut(u32 sz) {

FILE: Runtime/CMemoryCardSysNix.cpp
  type metaforce (line 11) | namespace metaforce {
    function GetPrefPath (line 13) | static std::optional<std::string> GetPrefPath(const char* app) {

FILE: Runtime/CMemoryCardSysOSX.cpp
  type metaforce (line 4) | namespace metaforce {

FILE: Runtime/CMemoryCardSysWin.cpp
  type metaforce (line 13) | namespace metaforce {
    function GetPrefPath (line 15) | static std::optional<std::string> GetPrefPath(const char* app) {
    type _stat64 (line 71) | struct _stat64

FILE: Runtime/CObjectList.cpp
  type metaforce (line 7) | namespace metaforce {
    function CEntity (line 52) | const CEntity* CObjectList::operator[](size_t i) const {
    function CEntity (line 59) | CEntity* CObjectList::operator[](size_t i) {
    function CEntity (line 66) | const CEntity* CObjectList::GetObjectById(TUniqueId uid) const {
    function CEntity (line 75) | CEntity* CObjectList::GetObjectById(TUniqueId uid) {
    function CEntity (line 84) | const CEntity* CObjectList::GetValidObjectById(TUniqueId uid) const {
    function CEntity (line 95) | CEntity* CObjectList::GetValidObjectById(TUniqueId uid) {

FILE: Runtime/CObjectList.hpp
  type metaforce (line 8) | namespace metaforce {
    type EGameObjectList (line 10) | enum class EGameObjectList {
    class CObjectList (line 22) | class CObjectList {
      type SObjectListEntry (line 25) | struct SObjectListEntry {
      class iterator (line 36) | class iterator {
        method iterator (line 40) | iterator(CObjectList& list, s16 id) : m_list(list), m_id(id) {}
        method iterator (line 43) | iterator& operator++() {
        method CEntity (line 49) | CEntity* operator*() const { return m_list.GetObjectByIndex(m_id); }
      class const_iterator (line 52) | class const_iterator {
        method const_iterator (line 56) | const_iterator(const CObjectList& list, s16 id) : m_list(list), m_...
        method const_iterator (line 59) | const_iterator& operator++() {
        method CEntity (line 65) | const CEntity* operator*() const { return m_list.GetObjectByIndex(...
      method iterator (line 68) | [[nodiscard]] iterator begin() { return iterator(*this, x2008_firstI...
        method iterator (line 40) | iterator(CObjectList& list, s16 id) : m_list(list), m_id(id) {}
        method iterator (line 43) | iterator& operator++() {
        method CEntity (line 49) | CEntity* operator*() const { return m_list.GetObjectByIndex(m_id); }
      method iterator (line 69) | [[nodiscard]] iterator end() { return iterator(*this, -1); }
        method iterator (line 40) | iterator(CObjectList& list, s16 id) : m_list(list), m_id(id) {}
        method iterator (line 43) | iterator& operator++() {
        method CEntity (line 49) | CEntity* operator*() const { return m_list.GetObjectByIndex(m_id); }
      method const_iterator (line 70) | [[nodiscard]] const_iterator begin() const { return const_iterator(*...
        method const_iterator (line 56) | const_iterator(const CObjectList& list, s16 id) : m_list(list), m_...
        method const_iterator (line 59) | const_iterator& operator++() {
        method CEntity (line 65) | const CEntity* operator*() const { return m_list.GetObjectByIndex(...
      method const_iterator (line 71) | [[nodiscard]] const_iterator end() const { return const_iterator(*th...
        method const_iterator (line 56) | const_iterator(const CObjectList& list, s16 id) : m_list(list), m_...
        method const_iterator (line 59) | const_iterator& operator++() {
        method CEntity (line 65) | const CEntity* operator*() const { return m_list.GetObjectByIndex(...
      method const_iterator (line 72) | [[nodiscard]] const_iterator cbegin() const { return begin(); }
        method const_iterator (line 56) | const_iterator(const CObjectList& list, s16 id) : m_list(list), m_...
        method const_iterator (line 59) | const_iterator& operator++() {
        method CEntity (line 65) | const CEntity* operator*() const { return m_list.GetObjectByIndex(...
      method const_iterator (line 73) | [[nodiscard]] const_iterator cend() const { return end(); }
        method const_iterator (line 56) | const_iterator(const CObjectList& list, s16 id) : m_list(list), m_...
        method const_iterator (line 59) | const_iterator& operator++() {
        method CEntity (line 65) | const CEntity* operator*() const { return m_list.GetObjectByIndex(...
      method CEntity (line 83) | const CEntity* GetObjectByIndex(s16 index) const { return x0_list[in...
      method CEntity (line 84) | CEntity* GetObjectByIndex(s16 index) { return x0_list[index].entity; }
      method s16 (line 88) | s16 GetFirstObjectIndex() const { return x2008_firstId; }
      method s16 (line 89) | s16 GetNextObjectIndex(s16 prev) const { return x0_list[prev].next; }
      method u16 (line 91) | u16 size() const { return x200a_count; }

FILE: Runtime/CPakFile.cpp
  type metaforce (line 5) | namespace metaforce {
    function SObjectTag (line 20) | const SObjectTag* CPakFile::GetResIdByName(std::string_view name) const {

FILE: Runtime/CPakFile.hpp
  type metaforce (line 13) | namespace metaforce {
    class CPakFile (line 15) | class CPakFile : public CDvdFile {
      type SResInfo (line 19) | struct SResInfo {
        method SResInfo (line 25) | SResInfo(CAssetId id, FourCC fcc, u32 offset, u32 size, u32 flags)...
        method u32 (line 31) | u32 GetOffset() const { return x5_offsetDiv32 * 32; }
        method u32 (line 32) | u32 GetSize() const { return x7_sizeDiv32 * 32; }
        method FourCC (line 33) | FourCC GetType() const { return CFactoryMgr::TypeIdxToFourCC(x4_ty...
        method IsCompressed (line 34) | bool IsCompressed() const { return x4_compressed; }
        method CAssetId (line 35) | CAssetId GetId() const { return x0_id; }
      type EAsyncPhase (line 44) | enum class EAsyncPhase {
      method IsWorldPak (line 74) | bool IsWorldPak() const { return x28_26_worldPak; }
      method IsOverridePak (line 75) | bool IsOverridePak() const { return m_override; }
      method u32 (line 76) | u32 GetFakeStaticSize() const { return 0; }
      method CAssetId (line 78) | CAssetId GetMLVLId() const { return m_mlvlId; }

FILE: Runtime/CPlayerState.cpp
  type metaforce (line 18) | namespace metaforce {
    function u32 (line 139) | u32 CPlayerState::GetMissileCostForAltAttack() const { return costs[si...
    function u32 (line 143) | u32 CPlayerState::CalculateItemCollectionRate() const {
    function CHealthInfo (line 182) | CHealthInfo& CPlayerState::GetHealthInfo() { return xc_health; }
    function CHealthInfo (line 184) | const CHealthInfo& CPlayerState::GetHealthInfo() const { return xc_hea...
    function u32 (line 284) | u32 CPlayerState::GetItemCapacity(CPlayerState::EItemType type) const {
    function u32 (line 290) | u32 CPlayerState::GetItemAmount(CPlayerState::EItemType type) const {
    function u32 (line 388) | u32 CPlayerState::GetPowerUpMaxValue(EItemType type) { return PowerUpM...

FILE: Runtime/CPlayerState.hpp
  type metaforce (line 12) | namespace metaforce {
    class CPlayerState (line 14) | class CPlayerState {
      type EItemType (line 18) | enum class EItemType : s32 {
      type EPlayerVisor (line 66) | enum class EPlayerVisor : u32 {
      type EPlayerSuit (line 76) | enum class EPlayerSuit : s32 {
      type EBeamId (line 88) | enum class EBeamId : s32 { Invalid = -1, Power, Ice, Wave, Plasma, P...
      type CPowerUp (line 91) | struct CPowerUp {
        method CPowerUp (line 94) | constexpr CPowerUp() = default;
        method CPowerUp (line 95) | constexpr CPowerUp(u32 amount, u32 capacity) : x0_amount(amount), ...
      method GetMissileComboChargeFactor (line 117) | static constexpr float GetMissileComboChargeFactor() { return 1.8f; }
      method u32 (line 122) | u32 GetPickupTotal() const { return 99; }
      method SetIsFusionEnabled (line 123) | void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
      method IsFusionEnabled (line 124) | bool IsFusionEnabled() const { return x0_26_fusion; }
      method EPlayerSuit (line 126) | EPlayerSuit GetCurrentSuitRaw() const { return x20_currentSuit; }
      method EBeamId (line 127) | EBeamId GetCurrentBeam() const { return x8_currentBeam; }
      method SetCurrentBeam (line 128) | void SetCurrentBeam(EBeamId beam) { x8_currentBeam = beam; }
      method EPlayerVisor (line 130) | EPlayerVisor GetCurrentVisor() const { return x14_currentVisor; }
      method EPlayerVisor (line 131) | EPlayerVisor GetTransitioningVisor() const { return x18_transitionin...
      method GetEnergyTankCapacity (line 151) | static float GetEnergyTankCapacity() { return 100.f; }
      method GetBaseHealthCapacity (line 152) | static float GetBaseHealthCapacity() { return 99.f; }
      method u32 (line 156) | u32 GetLogScans() const { return x180_scanCompletionRate.first; }
      method u32 (line 157) | u32 GetTotalLogScans() const { return x180_scanCompletionRate.second; }
      method SetScanCompletionRate (line 158) | void SetScanCompletionRate(const std::pair<u32, u32>& p) { x180_scan...
      method IsPlayerAlive (line 159) | bool IsPlayerAlive() const { return x0_24_alive; }
      method SetPlayerAlive (line 160) | void SetPlayerAlive(bool alive) { x0_24_alive = alive; }
      method IsFiringComboBeam (line 161) | bool IsFiringComboBeam() const { return x0_25_firingComboBeam; }
      method SetFiringComboBeam (line 162) | void SetFiringComboBeam(bool f) { x0_25_firingComboBeam = f; }
      method CStaticInterference (line 164) | CStaticInterference& GetStaticInterference() { return x188_staticInt...
      method CanTakeDamage (line 172) | bool CanTakeDamage() const { return m_canTakeDamage; }
      method SetCanTakeDamage (line 173) | void SetCanTakeDamage(bool c) { m_canTakeDamage = c; }

FILE: Runtime/CRandom16.cpp
  type metaforce (line 3) | namespace metaforce {
    function u32 (line 13) | u32 CRandom16::GetNumNextCalls() { return g_numNextCalls; }
    function u32 (line 15) | u32 CRandom16::GetLastSeed() { return g_lastSeed; }

FILE: Runtime/CRandom16.hpp
  type metaforce (line 5) | namespace metaforce {
    class CRandom16 (line 7) | class CRandom16 {
      method CRandom16 (line 12) | explicit CRandom16(s32 seed = 99) : m_seed(seed) {}
      method s32 (line 14) | s32 Next() {
      method s32 (line 21) | s32 GetSeed() const { return m_seed; }
      method SetSeed (line 23) | void SetSeed(s32 seed) { m_seed = seed; }
      method Float (line 25) | float Float() { return Next() * 0.000015259022f; }
      method Range (line 27) | float Range(float min, float max) { return min + Float() * (max - mi...
      method s32 (line 29) | s32 Range(s32 min, s32 max) { return min + (Next() % ((max - min) + ...
      method CRandom16 (line 31) | static CRandom16* GetRandomNumber() { return g_randomNumber; }
      method SetRandomNumber (line 32) | static void SetRandomNumber(CRandom16* rnd) { g_randomNumber = rnd; }
    class CGlobalRandom (line 40) | class CGlobalRandom {
      method CGlobalRandom (line 46) | CGlobalRandom(CRandom16& rand) : m_random(rand), m_prev(g_currentGlo...

FILE: Runtime/CResFactory.cpp
  type metaforce (line 11) | namespace metaforce {
    function CFactoryFnReturn (line 17) | CFactoryFnReturn CResFactory::BuildSync(const SObjectTag& tag, const C...

FILE: Runtime/CResFactory.hpp
  type metaforce (line 13) | namespace metaforce {
    class IDvdRequest (line 14) | class IDvdRequest
    class CSimplePool (line 15) | class CSimplePool
    class CResFactory (line 17) | class CResFactory : public IFactory {
      type SLoadingData (line 22) | struct SLoadingData {
        method SLoadingData (line 32) | SLoadingData() = default;
        method SLoadingData (line 33) | SLoadingData(const SObjectTag& tag, std::unique_ptr<IObj>* ptr, co...
      method CResLoader (line 47) | CResLoader& GetLoader() { return x4_loader; }
      method CanBuild (line 54) | bool CanBuild(const SObjectTag& tag) override { return x4_loader.Res...
      method u32 (line 56) | u32 ResourceSize(const metaforce::SObjectTag& tag) override { return...
      method LoadResourceSync (line 58) | std::unique_ptr<u8[]> LoadResourceSync(const metaforce::SObjectTag& ...
      method LoadNewResourcePartSync (line 62) | std::unique_ptr<u8[]> LoadNewResourcePartSync(const metaforce::SObje...
      method GetTagListForFile (line 66) | void GetTagListForFile(const char* pakName, std::vector<SObjectTag>&...
      method LoadResourceAsync (line 70) | std::shared_ptr<IDvdRequest> LoadResourceAsync(const metaforce::SObj...
      method LoadResourcePartAsync (line 74) | std::shared_ptr<IDvdRequest> LoadResourcePartAsync(const metaforce::...
      method SObjectTag (line 79) | const SObjectTag* GetResourceIdByName(std::string_view name) const o...
      method FourCC (line 83) | FourCC GetResourceTypeById(CAssetId id) const override { return x4_l...
      method GetResourceIdToNameList (line 85) | std::vector<std::pair<std::string, SObjectTag>> GetResourceIdToNameL...
      method EnumerateResources (line 89) | void EnumerateResources(const std::function<bool(const SObjectTag&)>...
      method EnumerateNamedResources (line 93) | void EnumerateNamedResources(const std::function<bool(std::string_vi...
      method UnloadPersistentResources (line 98) | void UnloadPersistentResources() { m_nonWorldTokens.clear(); }
      method CResLoader (line 100) | CResLoader* GetResLoader() override { return &x4_loader; }
      method CFactoryMgr (line 101) | CFactoryMgr* GetFactoryMgr() override { return &x5c_factoryMgr; }

FILE: Runtime/CResLoader.cpp
  type metaforce (line 7) | namespace metaforce {
    function u32 (line 155) | u32 CResLoader::ResourceSize(const SObjectTag& tag) const {
    function FourCC (line 163) | FourCC CResLoader::GetResourceTypeById(CAssetId id) const {
    function SObjectTag (line 169) | const SObjectTag* CResLoader::GetResourceIdByName(std::string_view nam...
    function CPakFile (line 220) | CPakFile* CResLoader::FindResourceForLoad(CAssetId id) {
    function CPakFile (line 244) | CPakFile* CResLoader::FindResourceForLoad(const SObjectTag& tag) { ret...

FILE: Runtime/CResLoader.hpp
  type metaforce (line 13) | namespace metaforce {
    class IDvdRequest (line 14) | class IDvdRequest
    type SObjectTag (line 15) | struct SObjectTag
    class CResLoader (line 17) | class CResLoader {

FILE: Runtime/CResourceNameDatabase.cpp
  type metaforce (line 7) | namespace metaforce {

FILE: Runtime/CResourceNameDatabase.hpp
  type metaforce (line 6) | namespace metaforce {
    class FileStoreManager (line 7) | class FileStoreManager
    class CResourceNameDatabase (line 8) | class CResourceNameDatabase {
      method hasAssetName (line 12) | bool hasAssetName(const CAssetId asset) const { return m_assetNames....
      method CResourceNameDatabase (line 22) | static CResourceNameDatabase* instance() { return m_instance; }

FILE: Runtime/CScannableObjectInfo.cpp
  type metaforce (line 5) | namespace metaforce {
    function CFactoryFnReturn (line 68) | CFactoryFnReturn FScannableObjectInfoFactory(const SObjectTag& tag, CI...

FILE: Runtime/CScannableObjectInfo.hpp
  type metaforce (line 10) | namespace metaforce {
    class CScannableObjectInfo (line 11) | class CScannableObjectInfo {
      type EPanelType (line 13) | enum class EPanelType {}
      type SBucket (line 17) | struct SBucket {
      method CAssetId (line 38) | CAssetId GetScannableObjectId() const { return x0_scannableObjectId; }
      method CAssetId (line 39) | CAssetId GetStringTableId() const { return x4_stringId; }
      method GetTotalDownloadTime (line 40) | float GetTotalDownloadTime() const { return x8_totalDownloadTime; }
      method SBucket (line 41) | const SBucket& GetBucket(size_t idx) const { return x14_buckets[idx]; }
      method u32 (line 42) | u32 GetCategory() const { return xc_category; }
      method IsImportant (line 43) | bool IsImportant() const { return x10_important; }

FILE: Runtime/CScriptMailbox.cpp
  type metaforce (line 9) | namespace metaforce {

FILE: Runtime/CScriptMailbox.hpp
  type metaforce (line 9) | namespace metaforce {
    class CWorldSaveGameInfo (line 10) | class CWorldSaveGameInfo
    class CStateManager (line 11) | class CStateManager
    type CMailMessage (line 14) | struct CMailMessage
      method CMailMessage (line 19) | CMailMessage(TEditorId id, EScriptObjectMessage msg, bool flag) : x0...
      method CMailMessage (line 20) | CMailMessage(const CMailMessage& other) : x0_id(other.x0_id), x4_msg...
    class CScriptMailbox (line 27) | class CScriptMailbox {
      method CScriptMailbox (line 31) | CScriptMailbox() = default;

FILE: Runtime/CSimplePool.cpp
  type metaforce (line 8) | namespace metaforce {
    function CToken (line 15) | CToken CSimplePool::GetObj(const SObjectTag& tag, const CVParamTransfe...
    function CToken (line 30) | CToken CSimplePool::GetObj(const SObjectTag& tag) { return GetObj(tag,...
    function CToken (line 32) | CToken CSimplePool::GetObj(std::string_view resourceName) { return Get...
    function CToken (line 34) | CToken CSimplePool::GetObj(std::string_view resourceName, const CVPara...

FILE: Runtime/CSimplePool.hpp
  type metaforce (line 10) | namespace metaforce {
    class CObjectReference (line 11) | class CObjectReference
    class IFactory (line 12) | class IFactory
    class CSimplePool (line 14) | class CSimplePool : public IObjectStore {
      method IFactory (line 31) | IFactory& GetFactory() const override { return x18_factory; }
      method GetLiveObjects (line 35) | size_t GetLiveObjects() const { return x8_resources.size(); }

FILE: Runtime/CSortedLists.cpp
  type metaforce (line 8) | namespace metaforce {
    function AccessElement (line 11) | auto AccessElement(T& arr, S idx) -> typename T::reference {
    function AccessElement (line 17) | auto AccessElement(const T& arr, S idx) -> typename T::const_reference {
    function s16 (line 119) | s16 CSortedListManager::FindInListUpper(ESortedList list, float value)...
    function s16 (line 139) | s16 CSortedListManager::FindInListLower(ESortedList list, float value)...
    function s16 (line 159) | s16 CSortedListManager::ConstructIntersectionArray(const zeus::CAABox&...
    function s16 (line 190) | s16 CSortedListManager::CalculateIntersections(ESortedList la, ESorted...

FILE: Runtime/CSortedLists.hpp
  type metaforce (line 10) | namespace metaforce {
    type ESortedList (line 11) | enum class ESortedList { MinX, MinY, MinZ, MaxX, MaxY, MaxZ }
    type SSortedList (line 13) | struct SSortedList {
      method Reset (line 16) | void Reset() { x0_ids.fill(-1); }
      method SSortedList (line 17) | SSortedList() { Reset(); }
    class CActor (line 20) | class CActor
    class CSortedListManager (line 21) | class CSortedListManager {
      type SNode (line 22) | struct SNode {
        method SNode (line 28) | SNode() = default;
        method SNode (line 29) | SNode(const CActor* act, const zeus::CAABox& aabb) : x0_actor(act)...

FILE: Runtime/CStateManager.cpp
  type metaforce (line 56) | namespace metaforce {
    function TAreaId (line 369) | TAreaId CStateManager::GetVisAreaId() const {
    function s32 (line 395) | s32 CStateManager::GetWeaponIdCount(TUniqueId uid, EWeaponType type) c...
    function TEditorId (line 1320) | TEditorId CStateManager::GetEditorIdForUniqueId(TUniqueId id) const {
    function TUniqueId (line 1328) | TUniqueId CStateManager::GetIdForScript(TEditorId id) const {
    function CObjectList (line 2468) | CObjectList* CStateManager::ObjectListById(EGameObjectList type) {
    function CObjectList (line 2475) | const CObjectList* CStateManager::GetObjectListById(EGameObjectList ty...
    function CRayCastResult (line 2679) | CRayCastResult CStateManager::RayStaticIntersection(const zeus::CVecto...
    function CRayCastResult (line 2684) | CRayCastResult CStateManager::RayWorldIntersection(TUniqueId& idOut, c...
    function TUniqueId (line 2712) | TUniqueId CStateManager::AllocateUniqueId() {
    function CGameArea (line 2788) | const CGameArea* CStateManager::GetCurrentArea() const {

FILE: Runtime/CStateManager.hpp
  type metaforce (line 36) | namespace metaforce {
    class CActor (line 37) | class CActor
    class CActorModelParticles (line 38) | class CActorModelParticles
    class CDamageInfo (line 39) | class CDamageInfo
    class CEnvFxManager (line 40) | class CEnvFxManager
    class CFluidPlaneManager (line 41) | class CFluidPlaneManager
    class CLight (line 42) | class CLight
    class CMapWorldInfo (line 43) | class CMapWorldInfo
    class CMaterialFilter (line 44) | class CMaterialFilter
    class CObjectList (line 45) | class CObjectList
    class CPlayer (line 46) | class CPlayer
    class CPlayerState (line 47) | class CPlayerState
    class CProjectedShadow (line 48) | class CProjectedShadow
    class CScriptMailbox (line 49) | class CScriptMailbox
    class CRumbleManager (line 50) | class CRumbleManager
    class CSortedListManager (line 51) | class CSortedListManager
    class CTexture (line 52) | class CTexture
    class CWorld (line 53) | class CWorld
    class CScriptLayerManager (line 54) | class CScriptLayerManager
    class CWorldTransManager (line 55) | class CWorldTransManager
    type CFinalInput (line 57) | struct CFinalInput
    type MP1 (line 59) | namespace MP1 {
      class CMFGameLoader (line 60) | class CMFGameLoader
    type SScriptObjectStream (line 63) | struct SScriptObjectStream {
    type SOnScreenTex (line 70) | struct SOnScreenTex {
    type EStateManagerTransition (line 76) | enum class EStateManagerTransition { InGame, MapScreen, PauseGame, Log...
    type EThermalDrawFlag (line 78) | enum class EThermalDrawFlag { Hot, Cold, Bypass }
    class CStateManager (line 80) | class CStateManager {
      type EGameState (line 84) | enum class EGameState { Running, SoftPaused, Paused }
      type CStateManagerContainer (line 117) | struct CStateManagerContainer {
      type EInitPhase (line 162) | enum class EInitPhase { LoadWorld, LoadFirstArea, Done }
      method u32 (line 224) | u32 GetInputFrameIdx() const { return x8d4_inputFrameIdx; }
      method GetEscapeSequenceTimer (line 234) | float GetEscapeSequenceTimer() const { return xf0c_escapeTimer; }
      method GetIdListEnd (line 279) | std::multimap<TEditorId, TUniqueId>::const_iterator GetIdListEnd() c...
      method EGameState (line 309) | EGameState GetGameState() const { return x904_gameState; }
      method TAreaId (line 331) | TAreaId GetNextAreaId() const { return x8cc_nextAreaId; }
      method CEntity (line 333) | CEntity* ObjectById(TUniqueId uid) const { return GetAllObjectList()...
      method CEntity (line 334) | const CEntity* GetObjectById(TUniqueId uid) const { return GetAllObj...
      method EStateManagerTransition (line 354) | EStateManagerTransition GetDeferredStateTransition() const { return ...
      method TUniqueId (line 356) | TUniqueId GetSkipCinematicSpecialFunction() const { return xf38_skip...
      method SetSkipCinematicSpecialFunction (line 357) | void SetSkipCinematicSpecialFunction(TUniqueId id) { xf38_skipCineSp...
      method GetHUDMessageTime (line 358) | float GetHUDMessageTime() const { return xf78_hudMessageTime; }
      method u32 (line 359) | u32 GetHUDMessageFrameCount() const { return xf80_hudMessageFrameCou...
      method CAssetId (line 360) | CAssetId GetPauseHUDMessage() const { return xf08_pauseHudMessage; }
      method IncrementHUDMessageFrameCounter (line 361) | void IncrementHUDMessageFrameCounter() { ++xf80_hudMessageFrameCount; }
      method ShouldQuitGame (line 362) | bool ShouldQuitGame() const { return xf94_25_quitGame; }
      method SetShouldQuitGame (line 363) | void SetShouldQuitGame(bool should) { xf94_25_quitGame = should; }
      method SetInSaveUI (line 364) | void SetInSaveUI(bool b) { xf94_28_inSaveUI = b; }
      method GetInSaveUI (line 365) | bool GetInSaveUI() const { return xf94_28_inSaveUI; }
      method SetInMapScreen (line 366) | void SetInMapScreen(bool b) { xf94_27_inMapScreen = b; }
      method GetInMapScreen (line 367) | bool GetInMapScreen() const { return xf94_27_inMapScreen; }
      method IsFullThreat (line 368) | bool IsFullThreat() const { return xf94_30_fullThreat; }
      method SetIsFullThreat (line 369) | void SetIsFullThreat(bool v) { xf94_30_fullThreat = v; }
      method CRandom16 (line 372) | CRandom16* GetActiveRandom() { return x900_activeRandom; }
      method CRandom16 (line 373) | const CRandom16* GetActiveRandom() const { return x900_activeRandom; }
      method SetActiveRandomToDefault (line 375) | void SetActiveRandomToDefault() { x900_activeRandom = &x8fc_random; }
      method ClearActiveRandom (line 376) | void ClearActiveRandom() { x900_activeRandom = nullptr; }
      method CRumbleManager (line 377) | CRumbleManager& GetRumbleManager() { return *x88c_rumbleManager; }
      method CRumbleManager (line 378) | const CRumbleManager& GetRumbleManager() const { return *x88c_rumble...
      method CCameraFilterPass (line 379) | CCameraFilterPass& GetCameraFilterPass(int idx) { return xb84_camFil...
      method CCameraFilterPass (line 380) | const CCameraFilterPass& GetCameraFilterPass(int idx) const { return...
      method CCameraBlurPass (line 381) | CCameraBlurPass& GetCameraBlurPass(int idx) { return xd14_camBlurPas...
      method CCameraBlurPass (line 382) | const CCameraBlurPass& GetCameraBlurPass(int idx) const { return xd1...
      method CEnvFxManager (line 384) | CEnvFxManager* GetEnvFxManager() { return x880_envFxManager; }
      method CEnvFxManager (line 385) | const CEnvFxManager* GetEnvFxManager() const { return x880_envFxMana...
      method CWorld (line 386) | CWorld* GetWorld() { return x850_world.get(); }
      method CWorld (line 387) | const CWorld* GetWorld() const { return x850_world.get(); }
      method CScriptMailbox (line 388) | CScriptMailbox* GetMailbox() { return x8bc_mailbox.get(); }
      method CScriptMailbox (line 389) | const CScriptMailbox* GetRelayTracker() const { return x8bc_mailbox....
      method CCameraManager (line 390) | CCameraManager* GetCameraManager() const { return x870_cameraManager; }
      method CFluidPlaneManager (line 391) | CFluidPlaneManager* GetFluidPlaneManager() const { return x87c_fluid...
      method CActorModelParticles (line 392) | CActorModelParticles* GetActorModelParticles() const { return x884_a...
      method CPlayer (line 399) | CPlayer& GetPlayer() const { return *x84c_player; }
      method CPlayer (line 400) | CPlayer* Player() const { return x84c_player.get(); }
      method CObjectList (line 402) | CObjectList& GetAllObjectList() const { return *x808_objLists[0]; }
      method CActorList (line 403) | CActorList& GetActorObjectList() const { return static_cast<CActorLi...
      method CPhysicsActorList (line 404) | CPhysicsActorList& GetPhysicsActorObjectList() const { return static...
      method CGameCameraList (line 405) | CGameCameraList& GetCameraObjectList() const { return static_cast<CG...
      method CGameLightList (line 406) | CGameLightList& GetLightObjectList() const { return static_cast<CGam...
      method CListeningAiList (line 407) | CListeningAiList& GetListeningAiObjectList() const { return static_c...
      method CAiWaypointList (line 408) | CAiWaypointList& GetAiWaypointObjectList() const { return static_cas...
      method CPlatformAndDoorList (line 409) | CPlatformAndDoorList& GetPlatformAndDoorObjectList() const {
      method SetCurrentMaze (line 413) | void SetCurrentMaze(std::unique_ptr<CMazeState> maze) { xf70_current...
      method ClearCurrentMaze (line 414) | void ClearCurrentMaze() { xf70_currentMaze.reset(); }
      method CMazeState (line 415) | CMazeState* GetCurrentMaze() { return xf70_currentMaze.get(); }
      method SetLastTriggerId (line 416) | void SetLastTriggerId(TUniqueId uid) { xf74_lastTrigger = uid; }
      method TUniqueId (line 417) | TUniqueId GetLastTriggerId() const { return xf74_lastTrigger; }
      method SetLastRelayId (line 418) | void SetLastRelayId(TUniqueId uid) { xf76_lastRelay = uid; }
      method TUniqueId (line 419) | TUniqueId* GetLastRelayIdPtr() { return &xf76_lastRelay; }
      method TUniqueId (line 420) | TUniqueId GetLastRelayId() const { return xf76_lastRelay; }
      method GetIsGeneratingObject (line 421) | bool GetIsGeneratingObject() const { return xf94_26_generatingObject; }
      method SetIsGeneratingObject (line 422) | void SetIsGeneratingObject(bool gen) { xf94_26_generatingObject = ge...
      method EThermalDrawFlag (line 423) | EThermalDrawFlag GetThermalDrawFlag() const { return xf34_thermalFla...
      method CFinalInput (line 424) | const CFinalInput& GetFinalInput() const { return xb54_finalInput; }
      method TUniqueId (line 426) | TUniqueId GetBossId() const { return xf18_bossId; }
      method GetTotalBossEnergy (line 427) | float GetTotalBossEnergy() const { return xf1c_totalBossEnergy; }
      method u32 (line 428) | u32 GetBossStringIdx() const { return xf20_bossStringIdx; }
      method SetPendingOnScreenTex (line 429) | void SetPendingOnScreenTex(CAssetId texId, const zeus::CVector2i& or...
      method SOnScreenTex (line 434) | const SOnScreenTex& GetPendingScreenTex() const { return xef4_pendin...
      method SetViewportScale (line 435) | void SetViewportScale(const zeus::CVector2f& scale) { xf2c_viewportS...
      method GetThermalColdScale1 (line 436) | float GetThermalColdScale1() const { return xf24_thermColdScale1; }
      method GetThermalColdScale2 (line 437) | float GetThermalColdScale2() const { return xf28_thermColdScale2; }
      method SetThermalColdScale2 (line 438) | void SetThermalColdScale2(float s) { xf28_thermColdScale2 = s; }
      method u32 (line 440) | u32 GetUpdateFrameIndex() const { return x8d8_updateFrameIdx; }
      method SetCinematicPause (line 441) | void SetCinematicPause(bool p) { xf94_29_cinematicPause = p; }
      method QueueMessage (line 442) | void QueueMessage(u32 frameCount, CAssetId msg, float f1) {
      method TUniqueId (line 447) | TUniqueId GetPlayerActorHead() const { return xf6c_playerActorHead; }
      method SetPlayerActorHead (line 448) | void SetPlayerActorHead(TUniqueId id) { xf6c_playerActorHead = id; }
      method SetWarping (line 458) | void SetWarping(bool warp) { m_warping = warp; }

FILE: Runtime/CStaticInterference.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/CStaticInterference.hpp
  type metaforce (line 6) | namespace metaforce {
    class CStateManager (line 7) | class CStateManager
    type CStaticInterferenceSource (line 9) | struct CStaticInterferenceSource {
    class CStaticInterference (line 15) | class CStaticInterference {

FILE: Runtime/CStopwatch.cpp
  type metaforce (line 3) | namespace metaforce {
    function u16 (line 10) | u16 CStopwatch::GetElapsedMicros() const {
    function u64 (line 14) | u64 CStopwatch::GetCurMicros() const {

FILE: Runtime/CStopwatch.hpp
  type metaforce (line 8) | namespace metaforce {
    class CStopwatch (line 9) | class CStopwatch {
      method CStopwatch (line 21) | static CStopwatch& GetGlobalTimerObj() { return mGlobalTimer; }
      method GetGlobalTime (line 22) | static float GetGlobalTime() { return mGlobalTimer.GetElapsedTime(); }

FILE: Runtime/CStringExtras.cpp
  function AppendUTF8 (line 10) | void AppendUTF8(char32_t codePoint, std::string& out) {
  function AppendUTF16 (line 28) | void AppendUTF16(char32_t codePoint, std::u16string& out) {
  type metaforce (line 41) | namespace metaforce {

FILE: Runtime/CStringExtras.hpp
  type metaforce (line 9) | namespace metaforce {
    class CInputStream (line 10) | class CInputStream
    class CStringExtras (line 11) | class CStringExtras {
      method CompareCaseInsensitive (line 31) | static bool CompareCaseInsensitive(std::string_view a, std::string_v...
      method IndexOfSubstring (line 36) | static int IndexOfSubstring(std::string_view haystack, std::string_v...
      method ToLower (line 47) | static inline void ToLower(std::string& str) { std::transform(str.be...
      method ParseBool (line 49) | static inline bool ParseBool(std::string_view boolean, bool* valid) {
      method Split (line 91) | static inline std::vector<std::string> Split(std::string_view s, cha...
      method LeftTrim (line 97) | static inline std::string LeftTrim(const std::string &s)
      method RightTrim (line 103) | static inline std::string RightTrim(const std::string &s)
      method Trim (line 109) | static inline std::string Trim(const std::string &s) {

FILE: Runtime/CTextureCache.cpp
  type metaforce (line 4) | namespace metaforce {
    function CTextureInfo (line 14) | const CTextureInfo* CTextureCache::GetTextureInfo(CAssetId id) const {
    function CFactoryFnReturn (line 21) | CFactoryFnReturn FTextureCacheFactory([[maybe_unused]] const SObjectTa...

FILE: Runtime/CTextureCache.hpp
  type metaforce (line 8) | namespace metaforce {
    class CPaletteInfo (line 9) | class CPaletteInfo {
      method CPaletteInfo (line 15) | explicit CPaletteInfo(CInputStream& in)
    class CTextureInfo (line 18) | class CTextureInfo {
      method CTextureInfo (line 27) | explicit CTextureInfo(CInputStream& in)
    class CTextureCache (line 38) | class CTextureCache {

FILE: Runtime/CTimeProvider.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/CTimeProvider.hpp
  type metaforce (line 2) | namespace metaforce {
    class CTimeProvider (line 3) | class CTimeProvider {
      method GetSecondsMod900 (line 11) | float GetSecondsMod900() const { return x0_currentTime; }

FILE: Runtime/CToken.cpp
  type metaforce (line 3) | namespace metaforce {
    function u16 (line 4) | u16 CObjectReference::RemoveReference() {
    function IObj (line 53) | IObj* CObjectReference::GetObject() {
    function IObj (line 98) | IObj* CToken::GetObj() {
    function CToken (line 104) | CToken& CToken::operator=(const CToken& other) {
    function CToken (line 117) | CToken& CToken::operator=(CToken&& other) noexcept {
    function SObjectTag (line 147) | const SObjectTag* CToken::GetObjectTag() const {

FILE: Runtime/CToken.hpp
  type metaforce (line 11) | namespace metaforce {
    class IObjectStore (line 12) | class IObjectStore
    class CObjectReference (line 15) | class CObjectReference {
      method IsLoading (line 36) | bool IsLoading() const { return x3_loading; }
      method IsLoaded (line 39) | bool IsLoaded() const { return x10_object.operator bool(); }
      method SObjectTag (line 56) | const SObjectTag& GetObjectTag() const { return x4_objTag; }
    class CToken (line 64) | class CToken {
      method HasReference (line 78) | bool HasReference() const { return x0_objRef != nullptr; }
      method IsLocked (line 82) | bool IsLocked() const { return x4_lockHeld; }
      method IObj (line 85) | const IObj* GetObj() const { return const_cast<CToken*>(this)->GetOb...
      method CToken (line 88) | CToken() = default;
      method CObjectReference (line 94) | const CObjectReference* GetObjectReference() const { return x0_objRe...
    class TToken (line 99) | class TToken : public CToken {
      method GetIObjObjectFor (line 101) | static std::unique_ptr<TObjOwnerDerivedFromIObj<T>> GetIObjObjectFor...
      method TToken (line 104) | TToken() = default;
      method TToken (line 106) | TToken(const CToken& other) : CToken(other) {}
      method TToken (line 107) | TToken(CToken&& other) : CToken(std::move(other)) {}
      method TToken (line 108) | TToken(std::unique_ptr<T>&& obj) : CToken(GetIObjObjectFor(std::move...
      method TToken (line 109) | TToken& operator=(std::unique_ptr<T>&& obj) {
      method Unlock (line 113) | virtual void Unlock() { CToken::Unlock(); }
      method Lock (line 114) | virtual void Lock() { CToken::Lock(); }
      method T (line 115) | virtual T* GetObj() {
      method T (line 121) | virtual const T* GetObj() const { return const_cast<TToken<T>*>(this...
      method TToken (line 122) | virtual TToken& operator=(const CToken& other) {
      method T (line 126) | T* operator->() { return GetObj(); }
      method T (line 127) | const T* operator->() const { return GetObj(); }
      method T (line 128) | T& operator*() { return *GetObj(); }
      method T (line 129) | const T& operator*() const { return *GetObj(); }
    class TCachedToken (line 133) | class TCachedToken : public TToken<T> {
      method TCachedToken (line 138) | TCachedToken() = default;
      method TCachedToken (line 139) | TCachedToken(const CToken& other) : TToken<T>(other) {}
      method TCachedToken (line 140) | TCachedToken(CToken&& other) : TToken<T>(std::move(other)) {}
      method T (line 141) | T* GetObj() override {
      method T (line 146) | const T* GetObj() const override { return const_cast<TCachedToken<T>...
      method Unlock (line 147) | void Unlock() override {
      method TCachedToken (line 152) | TCachedToken& operator=(const TCachedToken& other) {
      method TCachedToken (line 157) | TCachedToken& operator=(const CToken& other) override {
      method IsNull (line 163) | bool IsNull() const { return m_obj == nullptr; }
    class TLockedToken (line 167) | class TLockedToken : public TCachedToken<T> {
      method TLockedToken (line 169) | TLockedToken() = default;
      method TLockedToken (line 170) | TLockedToken(const TLockedToken& other) : TCachedToken<T>(other) { C...
      method TLockedToken (line 171) | TLockedToken& operator=(const TLockedToken& other) {
      method TLockedToken (line 177) | TLockedToken(const CToken& other) : TCachedToken<T>(other) { CToken:...
      method TLockedToken (line 178) | TLockedToken& operator=(const CToken& other) override {
      method TLockedToken (line 184) | TLockedToken(CToken&& other) {

FILE: Runtime/CWorldSaveGameInfo.cpp
  type metaforce (line 5) | namespace metaforce {
    function u32 (line 54) | u32 CWorldSaveGameInfo::GetAreaCount() const { return x0_areaCount; }
    function u32 (line 56) | u32 CWorldSaveGameInfo::GetCinematicCount() const { return x4_cinemati...
    function s32 (line 58) | s32 CWorldSaveGameInfo::GetCinematicIndex(const TEditorId& id) const {
    function u32 (line 65) | u32 CWorldSaveGameInfo::GetRelayCount() const { return x14_relays.size...
    function s32 (line 67) | s32 CWorldSaveGameInfo::GetRelayIndex(const TEditorId& id) const {
    function TEditorId (line 74) | TEditorId CWorldSaveGameInfo::GetRelayEditorId(u32 idx) const { return...
    function u32 (line 76) | u32 CWorldSaveGameInfo::GetDoorCount() const { return x34_doors.size(); }
    function s32 (line 78) | s32 CWorldSaveGameInfo::GetDoorIndex(const TEditorId& id) const {
    function CFactoryFnReturn (line 85) | CFactoryFnReturn FWorldSaveGameInfoFactory([[maybe_unused]] const SObj...

FILE: Runtime/CWorldSaveGameInfo.hpp
  type metaforce (line 8) | namespace metaforce {
    class CWorldSaveGameInfo (line 10) | class CWorldSaveGameInfo {
      type EScanCategory (line 12) | enum class EScanCategory { None, Data, Lore, Creature, Research, Art...
      type SScanState (line 14) | struct SScanState {
      type SLayerState (line 19) | struct SLayerState {

FILE: Runtime/Camera/CBallCamera.cpp
  type metaforce (line 23) | namespace metaforce {

FILE: Runtime/Camera/CBallCamera.hpp
  type metaforce (line 14) | namespace metaforce {
    class CPlayer (line 15) | class CPlayer
    class CCameraSpring (line 17) | class CCameraSpring {
      method CCameraSpring (line 25) | CCameraSpring(float k, float max, float tardis)
    class CCameraCollider (line 32) | class CCameraCollider {
      method CCameraCollider (line 44) | CCameraCollider(float radius, const zeus::CVector3f& vec, const CCam...
    class CBallCamera (line 54) | class CBallCamera : public CGameCamera {
      type EBallCameraBehaviour (line 58) | enum class EBallCameraBehaviour {
      type ESplineState (line 69) | enum class ESplineState { Invalid, Nav, Arc }
      type SFailsafeState (line 72) | struct SFailsafeState {
      method EBallCameraBehaviour (line 251) | [[nodiscard]] EBallCameraBehaviour GetBehaviour() const { return x18...
      method EBallCameraState (line 252) | [[nodiscard]] EBallCameraState GetState() const { return x400_state; }
      method TUniqueId (line 256) | [[nodiscard]] TUniqueId GetTooCloseActorId() const { return x3dc_too...
      method GetTooCloseActorDistance (line 257) | [[nodiscard]] float GetTooCloseActorDistance() const { return x3e0_t...
      method SetClampVelTimer (line 264) | void SetClampVelTimer(float f) { x470_clampVelTimer = f; }
      method SetClampVelRange (line 265) | void SetClampVelRange(float f) { x474_clampVelRange = f; }
      method TUniqueId (line 272) | const TUniqueId GetCollisionActorId() const { return x46c_collisionA...

FILE: Runtime/Camera/CCameraFilter.cpp
  type metaforce (line 13) | namespace metaforce {

FILE: Runtime/Camera/CCameraFilter.hpp
  type metaforce (line 9) | namespace metaforce {
    type EFilterType (line 10) | enum class EFilterType {
    type EFilterShape (line 23) | enum class EFilterShape {
    class CCameraFilterPass (line 35) | class CCameraFilterPass {
    type EBlurType (line 66) | enum class EBlurType { NoBlur, LoBlur, HiBlur, Xray }
    class CCameraBlurPass (line 68) | class CCameraBlurPass {
      method EBlurType (line 86) | EBlurType GetCurrType() const { return x10_curType; }

FILE: Runtime/Camera/CCameraManager.cpp
  type metaforce (line 21) | namespace metaforce {
    function CGameCamera (line 128) | CGameCamera* CCameraManager::GetCurrentCamera(CStateManager& stateMgr)...
    function CGameCamera (line 133) | const CGameCamera* CCameraManager::GetCurrentCamera(const CStateManage...
    function TUniqueId (line 708) | TUniqueId CCameraManager::GetLastCineCameraId() const {
    function CCinematicCamera (line 715) | const CCinematicCamera* CCameraManager::GetLastCineCamera(CStateManage...
    function CScriptCameraHint (line 719) | const CScriptCameraHint* CCameraManager::GetCameraHint(CStateManager& ...

FILE: Runtime/Camera/CCameraManager.hpp
  type metaforce (line 12) | namespace metaforce {
    class CBallCamera (line 13) | class CBallCamera
    class CCameraShakeData (line 14) | class CCameraShakeData
    class CCinematicCamera (line 15) | class CCinematicCamera
    class CFirstPersonCamera (line 16) | class CFirstPersonCamera
    class CGameCamera (line 17) | class CGameCamera
    class CInterpolationCamera (line 18) | class CInterpolationCamera
    class CScriptCameraHint (line 19) | class CScriptCameraHint
    class CScriptWater (line 20) | class CScriptWater
    class CStateManager (line 21) | class CStateManager
    type CFinalInput (line 23) | struct CFinalInput
    class CCameraManager (line 25) | class CCameraManager {
      method Aspect (line 71) | static float Aspect() { return 1.42f; }
      method FarPlane (line 72) | static float FarPlane() { return 750.0f; }
      method NearPlane (line 73) | static float NearPlane() { return 0.2f; }
      method FirstPersonFOV (line 74) | static float FirstPersonFOV() { return sFirstPersonFOV; }
      method ThirdPersonFOV (line 75) | static float ThirdPersonFOV() { return 60.0f; }
      method IsInCinematicCamera (line 79) | bool IsInCinematicCamera() const { return x4_cineCameras.size() != 0; }
      method SetCurrentCameraId (line 91) | void SetCurrentCameraId(TUniqueId id, CStateManager& stateMgr) { x0_...
      method TUniqueId (line 93) | TUniqueId GetCurrentCameraId() const {
      method TUniqueId (line 98) | TUniqueId GetLastCameraId() const {
      method CFirstPersonCamera (line 106) | CFirstPersonCamera* GetFirstPersonCamera() { return x7c_fpCamera; }
      method CFirstPersonCamera (line 107) | const CFirstPersonCamera* GetFirstPersonCamera() const { return x7c_...
      method CBallCamera (line 109) | CBallCamera* GetBallCamera() { return x80_ballCamera; }
      method CBallCamera (line 110) | const CBallCamera* GetBallCamera() const { return x80_ballCamera; }
      method GetFluidCounter (line 131) | int GetFluidCounter() const { return x74_fluidCounter; }
      method TUniqueId (line 139) | TUniqueId GetSpindleCameraId() const { return xa2_spindleCamId; }
      method TUniqueId (line 140) | TUniqueId GetPathCameraId() const { return xa4_pathCamId; }
      method ShouldBypassInterpolation (line 146) | bool ShouldBypassInterpolation() { return false; }

FILE: Runtime/Camera/CCameraShakeData.cpp
  type metaforce (line 12) | namespace metaforce {
    function SCameraShakePoint (line 14) | SCameraShakePoint SCameraShakePoint::LoadCameraShakePoint(CInputStream...
    function CCameraShakerComponent (line 23) | CCameraShakerComponent CCameraShakerComponent::LoadNewCameraShakerComp...
    function CCameraShakeData (line 102) | CCameraShakeData CCameraShakeData::LoadCameraShakeData(CInputStream& i...

FILE: Runtime/Camera/CCameraShakeData.hpp
  type metaforce (line 7) | namespace metaforce {
    class CRandom16 (line 8) | class CRandom16
    class CStateManager (line 9) | class CStateManager
    type SCameraShakePoint (line 11) | struct SCameraShakePoint {
      method SCameraShakePoint (line 19) | constexpr SCameraShakePoint() noexcept = default;
      method SCameraShakePoint (line 20) | constexpr SCameraShakePoint(bool useEnvelope, float attackTime, floa...
      method GetValue (line 27) | [[nodiscard]] constexpr float GetValue() const noexcept { return x0_...
    class CCameraShakerComponent (line 32) | class CCameraShakerComponent {
      method CCameraShakerComponent (line 39) | constexpr CCameraShakerComponent() noexcept = default;
      method CCameraShakerComponent (line 40) | constexpr CCameraShakerComponent(bool useModulation, const SCameraSh...
      method GetValue (line 45) | [[nodiscard]] constexpr float GetValue() const noexcept { return x38...
    class CCameraShakeData (line 48) | class CCameraShakeData {
      method CCameraShakeData (line 63) | constexpr CCameraShakeData(float duration, float sfxDist, u32 flags,...
      method CCameraShakeData (line 74) | constexpr CCameraShakeData(float duration, float magnitude) noexcept
      method CCameraShakeData (line 82) | static constexpr CCameraShakeData BuildLandingCameraShakeData(float ...
      method CCameraShakeData (line 102) | static constexpr CCameraShakeData BuildProjectileCameraShake(float d...
      method CCameraShakeData (line 118) | static constexpr CCameraShakeData BuildMissileCameraShake(float dura...
      method CCameraShakeData (line 125) | static constexpr CCameraShakeData BuildPhazonCameraShakeData(float d...
      method CCameraShakeData (line 145) | static constexpr CCameraShakeData BuildPatternedExplodeShakeData(flo...
      method CCameraShakeData (line 161) | static constexpr CCameraShakeData BuildPatternedExplodeShakeData(con...
      method SetShakerId (line 172) | void SetShakerId(u32 id) { xbc_shakerId = id; }
      method u32 (line 173) | u32 GetShakerId() const { return xbc_shakerId; }
      method SetSfxPositionAndDistance (line 175) | constexpr void SetSfxPositionAndDistance(const zeus::CVector3f& pos,...

FILE: Runtime/Camera/CCameraSpline.cpp
  type metaforce (line 8) | namespace metaforce {

FILE: Runtime/Camera/CCameraSpline.hpp
  type metaforce (line 6) | namespace metaforce {
    class CStateManager (line 7) | class CStateManager
    class CMaterialFilter (line 8) | class CMaterialFilter
    class CCameraSpline (line 10) | class CCameraSpline {
      method UpdateSplineLength (line 31) | void UpdateSplineLength() { x44_length = CalculateSplineLength(); }
      method s32 (line 38) | s32 GetSize() const { return x4_positions.size(); }
      method GetLength (line 39) | float GetLength() const { return x44_length; }
      method IsClosedLoop (line 40) | bool IsClosedLoop() const { return x48_closedLoop; }

FILE: Runtime/Camera/CCinematicCamera.cpp
  type metaforce (line 12) | namespace metaforce {

FILE: Runtime/Camera/CCinematicCamera.hpp
  type metaforce (line 12) | namespace metaforce {
    class CCinematicCamera (line 14) | class CCinematicCamera : public CGameCamera {
      method u32 (line 54) | u32 GetFlags() const { return x21c_flags; }
      method GetDuration (line 57) | float GetDuration() const { return x1e8_duration; }

FILE: Runtime/Camera/CFirstPersonCamera.cpp
  type metaforce (line 11) | namespace metaforce {

FILE: Runtime/Camera/CFirstPersonCamera.hpp
  type metaforce (line 9) | namespace metaforce {
    class CFirstPersonCamera (line 11) | class CFirstPersonCamera : public CGameCamera {
      method SetScriptPitchId (line 38) | void SetScriptPitchId(TUniqueId uid) { x1c4_pitchId = uid; }
      method SetLockCamera (line 39) | void SetLockCamera(bool v) { x18c_lockCamera = v; }
      method DeferBallTransitionProcessing (line 40) | void DeferBallTransitionProcessing() { x1c6_24_deferBallTransitionPr...

FILE: Runtime/Camera/CGameCamera.cpp
  type metaforce (line 7) | namespace metaforce {

FILE: Runtime/Camera/CGameCamera.hpp
  type metaforce (line 9) | namespace metaforce {
    type CFinalInput (line 10) | struct CFinalInput
    class CGameCamera (line 12) | class CGameCamera : public CActor {
      method GetNearClipDistance (line 47) | float GetNearClipDistance() const { return x160_znear; }
      method GetFarClipDistance (line 48) | float GetFarClipDistance() const { return x164_zfar; }
      method GetAspectRatio (line 49) | float GetAspectRatio() const { return x168_aspect; }
      method TUniqueId (line 50) | TUniqueId GetWatchedObject() const { return xe8_watchedObject; }
      method GetFov (line 51) | float GetFov() const { return x15c_currentFov; }

FILE: Runtime/Camera/CInterpolationCamera.cpp
  type metaforce (line 11) | namespace metaforce {

FILE: Runtime/Camera/CInterpolationCamera.hpp
  type metaforce (line 8) | namespace metaforce {
    class CInterpolationCamera (line 10) | class CInterpolationCamera : public CGameCamera {

FILE: Runtime/Camera/CPathCamera.cpp
  type metaforce (line 13) | namespace metaforce {

FILE: Runtime/Camera/CPathCamera.hpp
  type metaforce (line 6) | namespace metaforce {
    class CPathCamera (line 8) | class CPathCamera : public CGameCamera {
      type EInitialSplinePosition (line 10) | enum class EInitialSplinePosition { BallCamBasis, Negative, Positive...
      method Render (line 33) | void Render(CStateManager&) override {}

FILE: Runtime/Character/CActorLights.cpp
  type metaforce (line 15) | namespace metaforce {
    type SLightValue (line 103) | struct SLightValue {
    function CLight (line 490) | const CLight& CActorLights::GetLight(u32 idx) const {
    function u32 (line 499) | u32 CActorLights::GetActiveLightCount() const {

FILE: Runtime/Character/CActorLights.hpp
  type metaforce (line 12) | namespace metaforce {
    class CBooModel (line 13) | class CBooModel
    class CGameArea (line 14) | class CGameArea
    class CStateManager (line 15) | class CStateManager
    class CActorLights (line 17) | class CActorLights {
      method SetCastShadows (line 67) | void SetCastShadows(bool v) { x298_25_castShadows = v; }
      method SetHasAreaLights (line 68) | void SetHasAreaLights(bool v) { x298_26_hasAreaLights = v; }
      method SetFindShadowLight (line 69) | void SetFindShadowLight(bool v) { x298_27_findShadowLight = v; }
      method SetShadowDynamicRangeThreshold (line 70) | void SetShadowDynamicRangeThreshold(float t) { x2d0_shadowDynamicRan...
      method SetAmbienceGenerated (line 71) | void SetAmbienceGenerated(bool v) { x298_29_ambienceGenerated = v; }
      method SetMaxAreaLights (line 73) | void SetMaxAreaLights(int l) { x2b8_maxAreaLights = l; }
      method SetMaxDynamicLights (line 74) | void SetMaxDynamicLights(int l) { x2bc_maxDynamicLights = l; }
      method SetFindNearestDynamicLights (line 75) | void SetFindNearestDynamicLights(bool v) { x29a_findNearestDynamicLi...
      method SetAmbientColor (line 76) | void SetAmbientColor(const zeus::CColor& color) { x288_ambientColor ...
      method GetMaxAreaLights (line 80) | int GetMaxAreaLights() const { return x2b8_maxAreaLights; }
      method GetIsDirty (line 83) | bool GetIsDirty() const { return x298_24_dirty; }
      method SetDirty (line 84) | void SetDirty() { x298_24_dirty = true; }
      method HasShadowLight (line 85) | bool HasShadowLight() const { return x29c_shadowLightArrIdx != -1; }
      method s32 (line 86) | s32 GetShadowLightArrIndex() const { return x29c_shadowLightArrIdx; }
      method s32 (line 87) | s32 GetShadowLightIndex() const { return x2a0_shadowLightIdx; }
      method u32 (line 88) | u32 GetAreaUpdateFramePeriod() const { return x2a8_areaUpdateFramePe...
      method SetAreaUpdateFramePeriod (line 89) | void SetAreaUpdateFramePeriod(u32 p) { x2a8_areaUpdateFramePeriod = ...
      method GetActorPositionBias (line 90) | zeus::CVector3f GetActorPositionBias() const { return x2ac_actorPosB...
      method SetActorPositionBias (line 91) | void SetActorPositionBias(const zeus::CVector3f& bias) { x2ac_actorP...

FILE: Runtime/Character/CAdditiveAnimPlayback.cpp
  type metaforce (line 7) | namespace metaforce {

FILE: Runtime/Character/CAdditiveAnimPlayback.hpp
  type metaforce (line 7) | namespace metaforce {
    class CAdditiveAnimationInfo (line 8) | class CAdditiveAnimationInfo
      method read (line 19) | void read(CInputStream& in) {
      method CAdditiveAnimationInfo (line 23) | CAdditiveAnimationInfo() = default;
      method CAdditiveAnimationInfo (line 24) | explicit CAdditiveAnimationInfo(CInputStream& in) { read(in); }
      method GetFadeInDuration (line 25) | float GetFadeInDuration() const { return x0_fadeInDur; }
      method GetFadeOutDuration (line 26) | float GetFadeOutDuration() const { return x4_fadeOutDur; }
    class CAnimTreeNode (line 9) | class CAnimTreeNode
    class CCharLayoutInfo (line 10) | class CCharLayoutInfo
    class CSegIdList (line 11) | class CSegIdList
    class CSegStatementSet (line 12) | class CSegStatementSet
    class CAdditiveAnimationInfo (line 14) | class CAdditiveAnimationInfo {
      method read (line 19) | void read(CInputStream& in) {
      method CAdditiveAnimationInfo (line 23) | CAdditiveAnimationInfo() = default;
      method CAdditiveAnimationInfo (line 24) | explicit CAdditiveAnimationInfo(CInputStream& in) { read(in); }
      method GetFadeInDuration (line 25) | float GetFadeInDuration() const { return x0_fadeInDur; }
      method GetFadeOutDuration (line 26) | float GetFadeOutDuration() const { return x4_fadeOutDur; }
    type EAdditivePlaybackPhase (line 29) | enum class EAdditivePlaybackPhase { None, FadingIn, FadingOut, FadedIn...
    class CAdditiveAnimPlayback (line 31) | class CAdditiveAnimPlayback {
      method GetTargetWeight (line 49) | float GetTargetWeight() const { return xc_targetWeight; }
      method IsActive (line 50) | bool IsActive() const { return x14_active; }
      method SetActive (line 51) | void SetActive(bool active) { x14_active = active; }
      method EAdditivePlaybackPhase (line 54) | EAdditivePlaybackPhase GetPhase() const { return x1c_phase; }
      method SetNeedsFadeOut (line 55) | void SetNeedsFadeOut(bool b) { x20_needsFadeOut = b; }
      method NeedsFadeOut (line 56) | bool NeedsFadeOut() const { return x20_needsFadeOut; }

FILE: Runtime/Character/CAdditiveBodyState.cpp
  type metaforce (line 9) | namespace metaforce {

FILE: Runtime/Character/CAdditiveBodyState.hpp
  type metaforce (line 9) | namespace metaforce {
    class CActor (line 10) | class CActor
    class CBodyController (line 11) | class CBodyController
    class CStateManager (line 12) | class CStateManager
    class CAdditiveBodyState (line 14) | class CAdditiveBodyState {
      method ApplyHeadTracking (line 17) | virtual bool ApplyHeadTracking() const { return true; }
      method CanShoot (line 18) | virtual bool CanShoot() const { return true; }
    class CABSAim (line 24) | class CABSAim : public CAdditiveBodyState {
    class CABSFlinch (line 40) | class CABSFlinch : public CAdditiveBodyState {
      method Shutdown (line 48) | void Shutdown(CBodyController& bc) override {}
    class CABSIdle (line 51) | class CABSIdle : public CAdditiveBodyState {
      method Start (line 55) | void Start(CBodyController& bc, CStateManager& mgr) override {}
      method Shutdown (line 57) | void Shutdown(CBodyController& bc) override {}
    class CABSReaction (line 60) | class CABSReaction : public CAdditiveBodyState {
      method Shutdown (line 71) | void Shutdown(CBodyController& bc) override { StopAnimation(bc); }

FILE: Runtime/Character/CAllFormatsAnimSource.cpp
  type metaforce (line 8) | namespace metaforce {
    function CFactoryFnReturn (line 61) | CFactoryFnReturn AnimSourceFactory(const SObjectTag& tag, CInputStream...

FILE: Runtime/Character/CAllFormatsAnimSource.hpp
  type metaforce (line 13) | namespace metaforce {
    class IAnimReader (line 14) | class IAnimReader
    class IObjectStore (line 15) | class IObjectStore
    type EAnimFormat (line 17) | enum class EAnimFormat { Uncompressed, Unknown, BitstreamCompressed, B...
    class CAnimFormatUnion (line 19) | class CAnimFormatUnion {
      method EAnimFormat (line 31) | EAnimFormat GetFormat() const { return x0_format; }
      method CAnimSource (line 32) | CAnimSource& GetAsCAnimSource() { return *reinterpret_cast<CAnimSour...
      method CFBStreamedCompression (line 33) | CFBStreamedCompression& GetAsCFBStreamedCompression() {
    class CAllFormatsAnimSource (line 38) | class CAllFormatsAnimSource : public CAnimFormatUnion {

FILE: Runtime/Character/CAnimCharacterSet.cpp
  type metaforce (line 5) | namespace metaforce {
    function CFactoryFnReturn (line 10) | CFactoryFnReturn FAnimCharacterSet(const SObjectTag&, CInputStream& in...

FILE: Runtime/Character/CAnimCharacterSet.hpp
  type metaforce (line 7) | namespace metaforce {
    class CAnimCharacterSet (line 9) | class CAnimCharacterSet {
      method CCharacterSet (line 16) | const CCharacterSet& GetCharacterSet() const { return x4_characterSe...
      method CAnimationSet (line 17) | const CAnimationSet& GetAnimationSet() const { return x1c_animationS...

FILE: Runtime/Character/CAnimData.cpp
  type metaforce (line 29) | namespace metaforce {
    function CAssetId (line 112) | CAssetId CAnimData::GetEventResourceIdForAnimResourceId(CAssetId id) c...
    function SAdvancementResults (line 122) | SAdvancementResults CAnimData::AdvanceAdditiveAnim(std::shared_ptr<CAn...
    function SAdvancementDeltas (line 130) | SAdvancementDeltas CAnimData::AdvanceAdditiveAnims(float dt) {
    function SAdvancementDeltas (line 178) | SAdvancementDeltas CAnimData::UpdateAdditiveAnims(float dt) {
    function SAdvancementDeltas (line 264) | SAdvancementDeltas CAnimData::GetAdvancementDeltas(const CCharAnimTime...
    function CCharAnimTime (line 268) | CCharAnimTime CAnimData::GetTimeOfUserEvent(EUserEventType type, const...
    function SAdvancementDeltas (line 661) | SAdvancementDeltas CAnimData::DoAdvance(float dt, bool& suspendParticl...
    function SAdvancementDeltas (line 730) | SAdvancementDeltas CAnimData::Advance(float dt, const zeus::CVector3f&...
    function SAdvancementDeltas (line 748) | SAdvancementDeltas CAnimData::AdvanceIgnoreParticles(float dt, CRandom...
    function CSegId (line 869) | CSegId CAnimData::GetLocatorSegId(std::string_view name) const { retur...

FILE: Runtime/Character/CAnimData.hpp
  type EUserEventType (line 25) | enum class EUserEventType {
  type metaforce (line 63) | namespace metaforce {
    class CAnimTreeNode (line 64) | class CAnimTreeNode
    class CAnimationManager (line 65) | class CAnimationManager
    class CBoolPOINode (line 66) | class CBoolPOINode
    class CCharAnimTime (line 67) | class CCharAnimTime
    class CCharLayoutInfo (line 68) | class CCharLayoutInfo
    class CInt32POINode (line 69) | class CInt32POINode
    class CModel (line 70) | class CModel
    class CSkinnedModelWithAvgNormals (line 71) | class CSkinnedModelWithAvgNormals
    class CParticlePOINode (line 72) | class CParticlePOINode
    class CPrimitive (line 73) | class CPrimitive
    class CRandom16 (line 74) | class CRandom16
    class CSegIdList (line 75) | class CSegIdList
    class CSegStatementSet (line 76) | class CSegStatementSet
    class CSkinRules (line 77) | class CSkinRules
    class CSoundPOINode (line 78) | class CSoundPOINode
    class CStateManager (line 79) | class CStateManager
    class CTransitionManager (line 80) | class CTransitionManager
    class CVertexMorphEffect (line 81) | class CVertexMorphEffect
    class IAnimReader (line 82) | class IAnimReader
    class IMetaAnim (line 83) | class IMetaAnim
    type CAnimSysContext (line 85) | struct CAnimSysContext
    type CModelFlags (line 86) | struct CModelFlags
    type SAdvancementDeltas (line 87) | struct SAdvancementDeltas
    type SAdvancementResults (line 88) | struct SAdvancementResults
    class CAnimData (line 90) | class CAnimData {
      type EAnimDir (line 98) | enum class EAnimDir { Forward, Backward }
      method CCharacterInfo (line 170) | const CCharacterInfo& GetCharacterInfo() const { return xc_charInfo; }
      method CCharLayoutInfo (line 171) | const CCharLayoutInfo& GetCharLayoutInfo() const { return *xcc_layou...
      method GetIsLoop (line 185) | bool GetIsLoop() const { return x220_25_loop; }
      method EnableLooping (line 186) | void EnableLooping(bool val) {
      method EnableAnimation (line 190) | void EnableAnimation(bool val) { x220_24_animating = val; }
      method IsAnimating (line 191) | bool IsAnimating() const { return x220_24_animating; }
      method SetAnimDir (line 192) | void SetAnimDir(EAnimDir dir) { x104_animDir = dir; }
      method CPoseAsTransforms (line 203) | const CPoseAsTransforms& GetPose() const { return x224_pose; }
      method GetXRayModel (line 214) | std::shared_ptr<CSkinnedModel> GetXRayModel() const { return xf4_xra...
      method GetInfraModel (line 216) | std::shared_ptr<CSkinnedModel> GetInfraModel() const { return xf8_in...
      method CHierarchyPoseBuilder (line 231) | CHierarchyPoseBuilder& PoseBuilder() { return x2fc_poseBuilder; }
      method CHierarchyPoseBuilder (line 232) | const CHierarchyPoseBuilder& GetPoseBuilder() const { return x2fc_po...
      method CParticleDatabase (line 233) | const CParticleDatabase& GetParticleDB() const { return x120_particl...
      method CParticleDatabase (line 234) | CParticleDatabase& GetParticleDB() { return x120_particleDB; }
      method GetSpeedScale (line 237) | float GetSpeedScale() const { return x200_speedScale; }
      method u32 (line 238) | u32 GetPassedBoolPOICount() const { return x20c_passedBoolCount; }
      method u32 (line 239) | u32 GetPassedIntPOICount() const { return x210_passedIntCount; }
      method u32 (line 240) | u32 GetPassedParticlePOICount() const { return x214_passedParticleCo...
      method u32 (line 241) | u32 GetPassedSoundPOICount() const { return x218_passedSoundCount; }
      method s32 (line 243) | s32 GetCharacterIndex() const { return x204_charIdx; }
      method u16 (line 244) | u16 GetDefaultAnimation() const { return x208_defaultAnim; }
      method SetParticleLightIdx (line 247) | void SetParticleLightIdx(s32 idx) { x21c_particleLightIdx = idx; }
      method MarkPoseDirty (line 249) | void MarkPoseDirty() { x220_30_poseBuilt = false; }

FILE: Runtime/Character/CAnimPOIData.cpp
  type metaforce (line 5) | namespace metaforce {
    function CFactoryFnReturn (line 31) | CFactoryFnReturn AnimPOIDataFactory(const SObjectTag& tag, CInputStrea...

FILE: Runtime/Character/CAnimPOIData.hpp
  type metaforce (line 12) | namespace metaforce {
    class CAnimPOIData (line 14) | class CAnimPOIData {

FILE: Runtime/Character/CAnimPerSegmentData.hpp
  type metaforce (line 6) | namespace metaforce {
    type CAnimPerSegmentData (line 8) | struct CAnimPerSegmentData {

FILE: Runtime/Character/CAnimPlaybackParms.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimPlaybackParms (line 10) | class CAnimPlaybackParms {
      method CAnimPlaybackParms (line 23) | constexpr CAnimPlaybackParms() = default;
      method CAnimPlaybackParms (line 24) | constexpr CAnimPlaybackParms(s32 animA, s32 animB, float blendWeight...
      method CAnimPlaybackParms (line 26) | constexpr CAnimPlaybackParms(s32 anim, const zeus::CQuaternion* delt...
      method GetIsUseLocator (line 38) | constexpr bool GetIsUseLocator() const { return x18_useLocator; }
      method s32 (line 40) | constexpr s32 GetAnimationId() const { return x0_animA; }
      method s32 (line 41) | constexpr s32 GetSecondAnimationId() const { return x4_animB; }
      method GetBlendFactor (line 42) | constexpr float GetBlendFactor() const { return x8_blendWeight; }
      method SetAnimationId (line 43) | constexpr void SetAnimationId(s32 id) { x0_animA = id; }
      method SetSecondAnimationId (line 44) | constexpr void SetSecondAnimationId(s32 id) { x4_animB = id; }
      method SetBlendFactor (line 45) | constexpr void SetBlendFactor(float f) { x8_blendWeight = f; }
      method GetIsPlayAnimation (line 46) | constexpr bool GetIsPlayAnimation() const { return xc_animating; }

FILE: Runtime/Character/CAnimSource.cpp
  type metaforce (line 10) | namespace metaforce {
    function ClampZeroToOne (line 12) | static constexpr float ClampZeroToOne(float in) { return std::clamp(in...
    function u32 (line 14) | u32 RotationAndOffsetStorage::DataSizeInBytes(u32 rotPerFrame, u32 tra...
    function u32 (line 67) | u32 RotationAndOffsetStorage::GetFrameSizeInBytes() const { return (x1...
    function ReadIndexTable (line 76) | static std::vector<u8> ReadIndexTable(CInputStream& in) {

FILE: Runtime/Character/CAnimSource.hpp
  type metaforce (line 14) | namespace metaforce {
    class CAnimPOIData (line 15) | class CAnimPOIData
    class CBoolPOINode (line 16) | class CBoolPOINode
    class CInt32POINode (line 17) | class CInt32POINode
    class CParticlePOINode (line 18) | class CParticlePOINode
    class CSegId (line 19) | class CSegId
    class CSegIdList (line 20) | class CSegIdList
    class CSegStatementSet (line 21) | class CSegStatementSet
    class CSoundPOINode (line 22) | class CSoundPOINode
    class IObjectStore (line 23) | class IObjectStore
    class RotationAndOffsetStorage (line 25) | class RotationAndOffsetStorage {
      type CRotationAndOffsetVectors (line 39) | struct CRotationAndOffsetVectors {
    class CAnimSource (line 48) | class CAnimSource {
      method GetAverageVelocity (line 73) | float GetAverageVelocity() const { return x60_averageVelocity; }
      method CCharAnimTime (line 77) | const CCharAnimTime& GetDuration() const { return x0_duration; }
      method CSegId (line 78) | const CSegId& GetRootBoneId() const { return x1c_rootBone; }

FILE: Runtime/Character/CAnimSourceReader.cpp
  type metaforce (line 11) | namespace metaforce {
    function CCharAnimTime (line 27) | CCharAnimTime CAnimSourceInfo::GetAnimationDuration() const { return x...
    function s32 (line 189) | s32 CAnimSourceReaderBase::VGetInt32POIState(std::string_view name) co...
    function SAdvancementResults (line 226) | SAdvancementResults CAnimSourceReader::VGetAdvancementResults(const CC...
    function SAdvancementResults (line 273) | SAdvancementResults CAnimSourceReader::VReverseView(const CCharAnimTim...
    function SAdvancementResults (line 320) | SAdvancementResults CAnimSourceReader::VAdvanceView(const CCharAnimTim...
    function CCharAnimTime (line 360) | CCharAnimTime CAnimSourceReader::VGetTimeRemaining() const { return x5...
    function CSteadyStateAnimInfo (line 362) | CSteadyStateAnimInfo CAnimSourceReader::VGetSteadyStateAnimInfo() cons...

FILE: Runtime/Character/CAnimSourceReader.hpp
  type metaforce (line 14) | namespace metaforce {
    class IAnimSourceInfo (line 16) | class IAnimSourceInfo {
    class CAnimSourceInfo (line 27) | class CAnimSourceInfo : public IAnimSourceInfo {
    class CAnimSourceReaderBase (line 40) | class CAnimSourceReaderBase : public IAnimReader {
      method CCharAnimTime (line 81) | const CCharAnimTime& GetCurTime() const { return xc_curTime; }
    class CAnimSourceReader (line 84) | class CAnimSourceReader : public CAnimSourceReaderBase {
      method VSupportsReverseView (line 93) | bool VSupportsReverseView() const override { return true; }

FILE: Runtime/Character/CAnimSysContext.hpp
  type metaforce (line 10) | namespace metaforce {
    class CSimplePool (line 11) | class CSimplePool
    type CAnimSysContext (line 13) | struct CAnimSysContext {
      method CAnimSysContext (line 18) | CAnimSysContext(TToken<CTransitionDatabaseGame> transDB, u32 randomS...

FILE: Runtime/Character/CAnimTreeAnimReaderContainer.cpp
  type metaforce (line 5) | namespace metaforce {
    function u32 (line 11) | u32 CAnimTreeAnimReaderContainer::Depth() const { return 1; }
    function CAnimTreeEffectiveContribution (line 13) | CAnimTreeEffectiveContribution CAnimTreeAnimReaderContainer::VGetContr...
    function u32 (line 17) | u32 CAnimTreeAnimReaderContainer::VGetNumChildren() const { return 0; }
    function SAdvancementResults (line 21) | SAdvancementResults CAnimTreeAnimReaderContainer::VAdvanceView(const C...
    function CCharAnimTime (line 25) | CCharAnimTime CAnimTreeAnimReaderContainer::VGetTimeRemaining() const ...
    function CSteadyStateAnimInfo (line 27) | CSteadyStateAnimInfo CAnimTreeAnimReaderContainer::VGetSteadyStateAnim...
    function s32 (line 65) | s32 CAnimTreeAnimReaderContainer::VGetInt32POIState(std::string_view n...
    function SAdvancementResults (line 90) | SAdvancementResults CAnimTreeAnimReaderContainer::VGetAdvancementResul...

FILE: Runtime/Character/CAnimTreeAnimReaderContainer.hpp
  type metaforce (line 11) | namespace metaforce {
    class CAnimTreeAnimReaderContainer (line 13) | class CAnimTreeAnimReaderContainer : public CAnimTreeNode {

FILE: Runtime/Character/CAnimTreeBlend.cpp
  type metaforce (line 3) | namespace metaforce {
    function SAdvancementResults (line 14) | SAdvancementResults CAnimTreeBlend::VAdvanceView(const CCharAnimTime& ...
    function CCharAnimTime (line 34) | CCharAnimTime CAnimTreeBlend::VGetTimeRemaining() const {
    function CSteadyStateAnimInfo (line 40) | CSteadyStateAnimInfo CAnimTreeBlend::VGetSteadyStateAnimInfo() const {

FILE: Runtime/Character/CAnimTreeBlend.hpp
  type metaforce (line 8) | namespace metaforce {
    class CAnimTreeBlend (line 10) | class CAnimTreeBlend : public CAnimTreeTweenBase {

FILE: Runtime/Character/CAnimTreeDoubleChild.cpp
  type metaforce (line 3) | namespace metaforce {
    function SAdvancementResults (line 50) | SAdvancementResults CAnimTreeDoubleChild::VAdvanceView(const CCharAnim...
    function s32 (line 110) | s32 CAnimTreeDoubleChild::VGetInt32POIState(std::string_view name) con...
    function SAdvancementResults (line 121) | SAdvancementResults CAnimTreeDoubleChild::VGetAdvancementResults(const...
    function u32 (line 127) | u32 CAnimTreeDoubleChild::Depth() const { return std::max(x14_a->Depth...
    function CAnimTreeEffectiveContribution (line 129) | CAnimTreeEffectiveContribution CAnimTreeDoubleChild::VGetContributionO...
    function u32 (line 145) | u32 CAnimTreeDoubleChild::VGetNumChildren() const { return x14_a->VGet...

FILE: Runtime/Character/CAnimTreeDoubleChild.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimTreeDoubleChild (line 11) | class CAnimTreeDoubleChild : public CAnimTreeNode {
      class CDoubleChildAdvancementResult (line 13) | class CDoubleChildAdvancementResult {
        method CDoubleChildAdvancementResult (line 19) | CDoubleChildAdvancementResult(const CCharAnimTime& trueAdvancement...
        method SAdvancementDeltas (line 22) | const SAdvancementDeltas& GetLeftAdvancementDeltas() const { retur...
        method SAdvancementDeltas (line 23) | const SAdvancementDeltas& GetRightAdvancementDeltas() const { retu...
        method CCharAnimTime (line 24) | const CCharAnimTime& GetTrueAdvancement() const { return x0_trueAd...
      method GetRightChildWeight (line 58) | float GetRightChildWeight() const { return VGetRightChildWeight(); }

FILE: Runtime/Character/CAnimTreeLoopIn.cpp
  type metaforce (line 5) | namespace metaforce {
    function CAnimTreeEffectiveContribution (line 31) | CAnimTreeEffectiveContribution CAnimTreeLoopIn::VGetContributionOfHigh...
    function CSteadyStateAnimInfo (line 84) | CSteadyStateAnimInfo CAnimTreeLoopIn::VGetSteadyStateAnimInfo() const {
    function CCharAnimTime (line 88) | CCharAnimTime CAnimTreeLoopIn::VGetTimeRemaining() const {
    function SAdvancementResults (line 92) | SAdvancementResults CAnimTreeLoopIn::VAdvanceView(const CCharAnimTime&...

FILE: Runtime/Character/CAnimTreeLoopIn.hpp
  type metaforce (line 11) | namespace metaforce {
    class CAnimTreeLoopIn (line 13) | class CAnimTreeLoopIn : public CAnimTreeSingleChild {
      method VSupportsReverseView (line 29) | bool VSupportsReverseView() const { return false; }

FILE: Runtime/Character/CAnimTreeNode.cpp
  type metaforce (line 3) | namespace metaforce {
    function CAnimTreeEffectiveContribution (line 5) | CAnimTreeEffectiveContribution CAnimTreeNode::GetContributionOfHighest...
    function u32 (line 9) | u32 CAnimTreeNode::GetNumChildren() const { return VGetNumChildren(); }

FILE: Runtime/Character/CAnimTreeNode.hpp
  type metaforce (line 10) | namespace metaforce {
    class CAnimTreeNode (line 12) | class CAnimTreeNode : public IAnimReader {
      method CAnimTreeNode (line 17) | explicit CAnimTreeNode(std::string_view name) : x4_name(name) {}
      method IsCAnimTreeNode (line 18) | bool IsCAnimTreeNode() const override { return true; }
      method Cast (line 19) | static std::shared_ptr<CAnimTreeNode> Cast(std::unique_ptr<IAnimRead...
      method GetWeightedReaders (line 31) | void GetWeightedReaders(rstl::reserved_vector<std::pair<float, std::...
      method GetName (line 39) | std::string_view GetName() const { return x4_name; }

FILE: Runtime/Character/CAnimTreeSequence.cpp
  type metaforce (line 7) | namespace metaforce {
    function CAnimTreeEffectiveContribution (line 27) | CAnimTreeEffectiveContribution CAnimTreeSequence::VGetContributionOfHi...
    function SAdvancementResults (line 40) | SAdvancementResults CAnimTreeSequence::VAdvanceView(const CCharAnimTim...
    function CCharAnimTime (line 87) | CCharAnimTime CAnimTreeSequence::VGetTimeRemaining() const {
    function CSteadyStateAnimInfo (line 93) | CSteadyStateAnimInfo CAnimTreeSequence::VGetSteadyStateAnimInfo() const {

FILE: Runtime/Character/CAnimTreeSequence.hpp
  type metaforce (line 11) | namespace metaforce {
    class IMetaAnim (line 12) | class IMetaAnim
    class CTransitionDatabaseGame (line 13) | class CTransitionDatabaseGame
    class CAnimTreeSequence (line 15) | class CAnimTreeSequence : public CAnimTreeSingleChild {
      method VSupportsReverseView (line 30) | bool VSupportsReverseView() const { return false; }

FILE: Runtime/Character/CAnimTreeSingleChild.cpp
  type metaforce (line 3) | namespace metaforce {
    function SAdvancementResults (line 8) | SAdvancementResults CAnimTreeSingleChild::VAdvanceView(const CCharAnim...
    function CCharAnimTime (line 10) | CCharAnimTime CAnimTreeSingleChild::VGetTimeRemaining() const { return...
    function s32 (line 40) | s32 CAnimTreeSingleChild::VGetInt32POIState(std::string_view name) con...
    function SAdvancementResults (line 57) | SAdvancementResults CAnimTreeSingleChild::VGetAdvancementResults(const...
    function u32 (line 61) | u32 CAnimTreeSingleChild::Depth() const { return x14_child->Depth() + ...
    function u32 (line 63) | u32 CAnimTreeSingleChild::VGetNumChildren() const { return x14_child->...

FILE: Runtime/Character/CAnimTreeSingleChild.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimTreeSingleChild (line 11) | class CAnimTreeSingleChild : public CAnimTreeNode {
      method VGetWeightedReaders (line 40) | void VGetWeightedReaders(rstl::reserved_vector<std::pair<float, std:...

FILE: Runtime/Character/CAnimTreeTimeScale.cpp
  type metaforce (line 3) | namespace metaforce {
    function CCharAnimTime (line 22) | CCharAnimTime CAnimTreeTimeScale::GetRealLifeTime(const CCharAnimTime&...
    function s32 (line 116) | s32 CAnimTreeTimeScale::VGetInt32POIState(std::string_view name) const...
    function CAnimTreeEffectiveContribution (line 122) | CAnimTreeEffectiveContribution CAnimTreeTimeScale::VGetContributionOfH...
    function CSteadyStateAnimInfo (line 147) | CSteadyStateAnimInfo CAnimTreeTimeScale::VGetSteadyStateAnimInfo() con...
    function CCharAnimTime (line 160) | CCharAnimTime CAnimTreeTimeScale::VGetTimeRemaining() const {
    function SAdvancementResults (line 169) | SAdvancementResults CAnimTreeTimeScale::VAdvanceView(const CCharAnimTi...

FILE: Runtime/Character/CAnimTreeTimeScale.hpp
  type metaforce (line 11) | namespace metaforce {
    class CAnimTreeTimeScale (line 13) | class CAnimTreeTimeScale : public CAnimTreeSingleChild {

FILE: Runtime/Character/CAnimTreeTransition.cpp
  type metaforce (line 3) | namespace metaforce {
    function CCharAnimTime (line 34) | CCharAnimTime CAnimTreeTransition::VGetTimeRemaining() const {
    function CSteadyStateAnimInfo (line 40) | CSteadyStateAnimInfo CAnimTreeTransition::VGetSteadyStateAnimInfo() co...
    function SAdvancementResults (line 70) | SAdvancementResults CAnimTreeTransition::AdvanceViewForTransitionalPer...
    function SAdvancementResults (line 97) | SAdvancementResults CAnimTreeTransition::VAdvanceView(const CCharAnimT...

FILE: Runtime/Character/CAnimTreeTransition.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimTreeTransition (line 11) | class CAnimTreeTransition : public CAnimTreeTweenBase {

FILE: Runtime/Character/CAnimTreeTweenBase.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Character/CAnimTreeTweenBase.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimTreeTweenBase (line 11) | class CAnimTreeTweenBase : public CAnimTreeDoubleChild {
      method GetBlendingWeight (line 26) | float GetBlendingWeight() const { return VGetBlendingWeight(); }
      method VGetRightChildWeight (line 30) | float VGetRightChildWeight() const override { return GetBlendingWeig...
      method VReverseSimplified (line 39) | virtual std::optional<std::unique_ptr<IAnimReader>> VReverseSimplifi...
      method ShouldCullTree (line 41) | static bool ShouldCullTree() { return 3 <= sAdvancementDepth; }
      method IncAdvancementDepth (line 42) | static void IncAdvancementDepth() { sAdvancementDepth++; }
      method DecAdvancementDepth (line 43) | static void DecAdvancementDepth() { sAdvancementDepth--; }

FILE: Runtime/Character/CAnimation.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CAnimation.hpp
  type metaforce (line 9) | namespace metaforce {
    class IMetaAnim (line 10) | class IMetaAnim
    class CAnimation (line 12) | class CAnimation {
      method GetMetaAnimName (line 19) | std::string_view GetMetaAnimName() const { return x0_name; }

FILE: Runtime/Character/CAnimationDatabase.hpp
  type metaforce (line 9) | namespace metaforce {
    class CPrimitive (line 10) | class CPrimitive
    class IMetaAnim (line 11) | class IMetaAnim
    class CAnimationDatabase (line 13) | class CAnimationDatabase {

FILE: Runtime/Character/CAnimationDatabaseGame.cpp
  type metaforce (line 7) | namespace metaforce {
    function u32 (line 17) | u32 CAnimationDatabaseGame::GetNumMetaAnims() const { return x10_anims...

FILE: Runtime/Character/CAnimationDatabaseGame.hpp
  type metaforce (line 8) | namespace metaforce {
    class CAnimation (line 9) | class CAnimation
    class CAnimationDatabaseGame (line 11) | class CAnimationDatabaseGame final : public CAnimationDatabase {

FILE: Runtime/Character/CAnimationManager.cpp
  type metaforce (line 6) | namespace metaforce {
    function CAnimationDatabaseGame (line 8) | const CAnimationDatabaseGame* CAnimationManager::GetAnimationDatabase(...

FILE: Runtime/Character/CAnimationManager.hpp
  type metaforce (line 9) | namespace metaforce {
    class CAnimTreeNode (line 10) | class CAnimTreeNode
    class CSimplePool (line 11) | class CSimplePool
    class IMetaAnim (line 12) | class IMetaAnim
    type CMetaAnimTreeBuildOrders (line 14) | struct CMetaAnimTreeBuildOrders
    class CAnimationManager (line 16) | class CAnimationManager {
      method CAnimationManager (line 21) | CAnimationManager(TToken<CAnimationDatabaseGame> animDB, CAnimSysCon...

FILE: Runtime/Character/CAnimationSet.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CAnimationSet.hpp
  type metaforce (line 14) | namespace metaforce {
    class CAnimationSet (line 16) | class CAnimationSet {
      method CAdditiveAnimationInfo (line 34) | const CAdditiveAnimationInfo& GetDefaultAdditiveInfo() const { retur...

FILE: Runtime/Character/CAssetFactory.cpp
  type metaforce (line 9) | namespace metaforce {
    function CFactoryFnReturn (line 11) | CFactoryFnReturn CCharacterFactoryBuilder::CDummyFactory::Build(const ...
    function SObjectTag (line 27) | const SObjectTag* CCharacterFactoryBuilder::CDummyFactory::GetResource...
    function FourCC (line 31) | FourCC CCharacterFactoryBuilder::CDummyFactory::GetResourceTypeById(CA...
    function u32 (line 39) | u32 CCharacterFactoryBuilder::CDummyFactory::ResourceSize(const metafo...

FILE: Runtime/Character/CAssetFactory.hpp
  type metaforce (line 11) | namespace metaforce {
    class CCharacterFactory (line 12) | class CCharacterFactory
    class CAnimRes (line 13) | class CAnimRes
    class CCharacterFactoryBuilder (line 15) | class CCharacterFactoryBuilder {
      class CDummyFactory (line 17) | class CDummyFactory : public IFactory {

FILE: Runtime/Character/CBodyController.cpp
  type metaforce (line 12) | namespace metaforce {
    function CPASDatabase (line 97) | const CPASDatabase& CBodyController::GetPASDatabase() const {

FILE: Runtime/Character/CBodyController.hpp
  type metaforce (line 11) | namespace metaforce {
    class CActor (line 12) | class CActor
    class CAnimPlaybackParms (line 13) | class CAnimPlaybackParms
    class CPASAnimParmData (line 14) | class CPASAnimParmData
    class CPASDatabase (line 15) | class CPASDatabase
    class CRandom16 (line 16) | class CRandom16
    class CStateManager (line 17) | class CStateManager
    type CFinalInput (line 19) | struct CFinalInput
    class CBodyController (line 21) | class CBodyController {
      method GetCurrentStateId (line 49) | pas::EAnimationState GetCurrentStateId() const { return x2a4_bodySta...
      method CBodyStateCmdMgr (line 50) | CBodyStateCmdMgr& GetCommandMgr() { return x4_cmdMgr; }
      method CBodyStateCmdMgr (line 51) | const CBodyStateCmdMgr& GetCommandMgr() const { return x4_cmdMgr; }
      method SetDoDeathAnims (line 52) | void SetDoDeathAnims(bool d) { x300_28_playDeathAnims = d; }
      method IsElectrocuting (line 53) | bool IsElectrocuting() const { return x324_electrocutionDur > 0.f; }
      method IsOnFire (line 54) | bool IsOnFire() const { return x320_fireDur > 0.f; }
      method IsFrozen (line 55) | bool IsFrozen() const { return x300_26_frozen; }
      method CBodyStateInfo (line 56) | const CBodyStateInfo& GetBodyStateInfo() const { return x2a4_bodySta...
      method CBodyStateInfo (line 57) | CBodyStateInfo& BodyStateInfo() { return x2a4_bodyStateInfo; }
      method GetTurnSpeed (line 58) | float GetTurnSpeed() const { return x2fc_turnSpeed; }
      method SetLocomotionType (line 59) | void SetLocomotionType(pas::ELocomotionType type) { x2ec_locomotionT...
      method GetLocomotionType (line 60) | pas::ELocomotionType GetLocomotionType() const { return x2ec_locomot...
      method CActor (line 61) | CActor& GetOwner() const { return x0_actor; }
      method IsAnimationOver (line 62) | bool IsAnimationOver() const { return x300_24_animationOver; }
      method ShouldPlayDeathAnims (line 64) | bool ShouldPlayDeathAnims() const { return x300_28_playDeathAnims; }
      method s32 (line 65) | s32 GetCurrentAnimId() const { return x2f8_curAnim; }
      method CAdditiveBodyState (line 67) | CAdditiveBodyState* GetCurrentAdditiveState() { return x2a4_bodyStat...
      method SetState (line 68) | void SetState(pas::EAnimationState state) { x2a4_bodyStateInfo.SetSt...
      method ShouldBeHurled (line 70) | bool ShouldBeHurled() const { return HasBodyState(pas::EAnimationSta...
      method GetFallState (line 72) | pas::EFallState GetFallState() const { return x2f0_fallState; }
      method SetFallState (line 73) | void SetFallState(pas::EFallState state) { x2f0_fallState = state; }
      method SetAdditiveState (line 75) | void SetAdditiveState(pas::EAnimationState state) { x2a4_bodyStateIn...
      method SetDeltaRotation (line 81) | void SetDeltaRotation(const zeus::CQuaternion& q) { x2dc_rot *= q; }
      method GetCurrentAdditiveStateId (line 99) | pas::EAnimationState GetCurrentAdditiveStateId() const { return x2a4...
      method EBodyType (line 100) | EBodyType GetBodyType() const { return x2f4_bodyType; }
      method HasBeenFrozen (line 101) | bool HasBeenFrozen() const { return x300_27_hasBeenFrozen; }
      method GetRestrictedFlyerMoveSpeed (line 102) | float GetRestrictedFlyerMoveSpeed() const { return x330_restrictedFl...
      method SetRestrictedFlyerMoveSpeed (line 103) | void SetRestrictedFlyerMoveSpeed(float speed) { x330_restrictedFlyer...
      method GetActive (line 104) | bool GetActive() const { return x300_25_active; }

FILE: Runtime/Character/CBodyState.cpp
  type metaforce (line 11) | namespace metaforce {

FILE: Runtime/Character/CBodyState.hpp
  type metaforce (line 9) | namespace metaforce {
    class CBodyController (line 10) | class CBodyController
    class CStateManager (line 11) | class CStateManager
    class CActor (line 12) | class CActor
    class CBodyState (line 13) | class CBodyState {
      method IsInAir (line 16) | virtual bool IsInAir(const CBodyController&) const { return false; }
      method IsDead (line 17) | virtual bool IsDead() const { return false; }
      method IsDying (line 18) | virtual bool IsDying() const { return false; }
      method IsMoving (line 19) | virtual bool IsMoving() const { return false; }
      method ApplyGravity (line 20) | virtual bool ApplyGravity() const { return true; }
      method ApplyHeadTracking (line 21) | virtual bool ApplyHeadTracking() const { return true; }
      method ApplyAnimationDeltas (line 22) | virtual bool ApplyAnimationDeltas() const { return true; }
      method CanShoot (line 23) | virtual bool CanShoot() const { return false; }
    class CBSAttack (line 29) | class CBSAttack : public CBodyState {
      method CanShoot (line 40) | bool CanShoot() const override { return false; }
      method Shutdown (line 43) | void Shutdown(CBodyController&) override {}
    class CBSProjectileAttack (line 46) | class CBSProjectileAttack : public CBodyState {
      method CanShoot (line 50) | bool CanShoot() const override { return true; }
      method Shutdown (line 53) | void Shutdown(CBodyController&) override {}
    class CBSDie (line 56) | class CBSDie : public CBodyState {
      method IsDead (line 61) | bool IsDead() const override { return x8_isDead; }
      method IsDying (line 62) | bool IsDying() const override { return true; }
      method Shutdown (line 65) | void Shutdown(CBodyController&) override {}
    class CBSFall (line 68) | class CBSFall : public CBodyState {
    class CBSGetup (line 80) | class CBSGetup : public CBodyState {
    class CBSKnockBack (line 90) | class CBSKnockBack : public CBodyState {
      method IsMoving (line 97) | bool IsMoving() const override { return true; }
      method Shutdown (line 100) | void Shutdown(CBodyController&) override {}
    class CBSLieOnGround (line 103) | class CBSLieOnGround : public CBodyState {
    class CBSStep (line 114) | class CBSStep : public CBodyState {
      method IsMoving (line 118) | bool IsMoving() const override { return true; }
      method CanShoot (line 119) | bool CanShoot() const override { return true; }
      method Shutdown (line 122) | void Shutdown(CBodyController&) override {}
    class CBSTurn (line 125) | class CBSTurn : public CBodyState {
      method CanShoot (line 133) | bool CanShoot() const override { return true; }
      method Shutdown (line 136) | void Shutdown(CBodyController&) override {}
    class CBSFlyerTurn (line 140) | class CBSFlyerTurn : public CBSTurn {
    class CBSLoopAttack (line 146) | class CBSLoopAttack : public CBodyState {
      method CBSLoopAttack (line 154) | CBSLoopAttack() = default;
      method CanShoot (line 155) | bool CanShoot() const override { return true; }
      method Shutdown (line 158) | void Shutdown(CBodyController&) override {}
    class CBSLoopReaction (line 161) | class CBSLoopReaction : public CBodyState {
      method CBSLoopReaction (line 169) | CBSLoopReaction() = default;
      method Shutdown (line 172) | void Shutdown(CBodyController&) override {}
    class CBSGroundHit (line 175) | class CBSGroundHit : public CBodyState {
    class CBSGenerate (line 187) | class CBSGenerate : public CBodyState {
      method Shutdown (line 193) | void Shutdown(CBodyController&) override {}
    class CBSJump (line 196) | class CBSJump : public CBodyState {
      method CBSJump (line 213) | CBSJump() = default;
      method IsMoving (line 214) | bool IsMoving() const override { return true; }
      method ApplyHeadTracking (line 215) | bool ApplyHeadTracking() const override { return false; }
      method Shutdown (line 221) | void Shutdown(CBodyController&) override {}
    class CBSHurled (line 224) | class CBSHurled : public CBodyState {
      method CBSHurled (line 242) | CBSHurled() = default;
      method IsMoving (line 243) | bool IsMoving() const override { return true; }
      method IsInAir (line 244) | bool IsInAir(const CBodyController&) const override { return true; }
      method ApplyHeadTracking (line 245) | bool ApplyHeadTracking() const override { return false; }
      method Shutdown (line 248) | void Shutdown(CBodyController&) override {}
    class CBSSlide (line 251) | class CBSSlide : public CBodyState {
      method ApplyHeadTracking (line 256) | bool ApplyHeadTracking() const override { return false; }
      method IsMoving (line 257) | bool IsMoving() const override { return true; }
      method Shutdown (line 260) | void Shutdown(CBodyController&) override {}
    class CBSTaunt (line 263) | class CBSTaunt : public CBodyState {
      method Shutdown (line 269) | void Shutdown(CBodyController&) override {}
    class CBSScripted (line 272) | class CBSScripted : public CBodyState {
      method CBSScripted (line 279) | CBSScripted() = default;
      method ApplyHeadTracking (line 280) | bool ApplyHeadTracking() const override { return false; }
      method Shutdown (line 283) | void Shutdown(CBodyController&) override {}
    class CBSCover (line 286) | class CBSCover : public CBodyState {
      method ApplyHeadTracking (line 293) | bool ApplyHeadTracking() const override { return false; }
      method IsMoving (line 294) | bool IsMoving() const override { return true; }
      method CanShoot (line 295) | bool CanShoot() const override { return x4_state == pas::ECoverState...
      method Shutdown (line 298) | void Shutdown(CBodyController&) override {}
    class CBSWallHang (line 301) | class CBSWallHang : public CBodyState {
      method CBSWallHang (line 314) | CBSWallHang() = default;
      method IsMoving (line 315) | bool IsMoving() const override { return true; }
      method CanShoot (line 316) | bool CanShoot() const override { return x4_state == pas::EWallHangSt...
      method Shutdown (line 323) | void Shutdown(CBodyController&) override {}
    class CBSLocomotion (line 326) | class CBSLocomotion : public CBodyState {
      method CanShoot (line 335) | bool CanShoot() const override { return true; }
      method IsPitchable (line 339) | virtual bool IsPitchable() const { return false; }
    class CBSBiPedLocomotion (line 346) | class CBSBiPedLocomotion : public CBSLocomotion {
      method IsMoving (line 360) | bool IsMoving() const override { return x3c4_anim != pas::ELocomotio...
    class CBSFlyerLocomotion (line 368) | class CBSFlyerLocomotion : public CBSBiPedLocomotion {
      method IsPitchable (line 373) | bool IsPitchable() const override { return x3cc_pitchable; }
      method IsBackPedal (line 375) | virtual bool IsBackPedal(CBodyController& bc) const { return false; }
    class CBSWallWalkerLocomotion (line 378) | class CBSWallWalkerLocomotion : public CBSBiPedLocomotion {
    class CBSNewFlyerLocomotion (line 384) | class CBSNewFlyerLocomotion : public CBSBiPedLocomotion {
    class CBSRestrictedLocomotion (line 391) | class CBSRestrictedLocomotion : public CBSLocomotion {
      method IsMoving (line 397) | bool IsMoving() const override { return false; }
      method GetLocomotionSpeed (line 398) | float GetLocomotionSpeed(pas::ELocomotionType type, pas::ELocomotion...
    class CBSRestrictedFlyerLocomotion (line 402) | class CBSRestrictedFlyerLocomotion : public CBSRestrictedLocomotion {

FILE: Runtime/Character/CBodyStateCmdMgr.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CBodyStateCmdMgr.hpp
  type metaforce (line 9) | namespace metaforce {
    class CBodyStateCmd (line 11) | class CBodyStateCmd {
      method CBodyStateCmd (line 16) | constexpr explicit CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
      method EBodyStateCmd (line 17) | constexpr EBodyStateCmd GetCommandId() const { return x4_cmd; }
    class CBCMeleeAttackCmd (line 20) | class CBCMeleeAttackCmd : public CBodyStateCmd {
      method CBCMeleeAttackCmd (line 26) | constexpr explicit CBCMeleeAttackCmd() : CBodyStateCmd(EBodyStateCmd...
      method CBCMeleeAttackCmd (line 27) | constexpr explicit CBCMeleeAttackCmd(pas::ESeverity severity)
      method CBCMeleeAttackCmd (line 29) | constexpr explicit CBCMeleeAttackCmd(pas::ESeverity severity, const ...
      method GetAttackSeverity (line 31) | constexpr pas::ESeverity GetAttackSeverity() const { return x8_sever...
      method HasAttackTargetPos (line 32) | constexpr bool HasAttackTargetPos() const { return x18_hasTargetPos; }
    class CBCProjectileAttackCmd (line 36) | class CBCProjectileAttackCmd : public CBodyStateCmd {
      method CBCProjectileAttackCmd (line 42) | constexpr explicit CBCProjectileAttackCmd() : CBodyStateCmd(EBodySta...
      method CBCProjectileAttackCmd (line 43) | constexpr explicit CBCProjectileAttackCmd(pas::ESeverity severity, c...
      method GetAttackSeverity (line 45) | constexpr pas::ESeverity GetAttackSeverity() const { return x8_sever...
      method BlendTwoClosest (line 47) | constexpr bool BlendTwoClosest() const { return x18_blendAnims; }
    class CBCStepCmd (line 50) | class CBCStepCmd : public CBodyStateCmd {
      method CBCStepCmd (line 55) | constexpr explicit CBCStepCmd() : CBodyStateCmd(EBodyStateCmd::Step) {}
      method CBCStepCmd (line 56) | constexpr explicit CBCStepCmd(pas::EStepDirection dir, pas::EStepTyp...
      method GetStepDirection (line 58) | constexpr pas::EStepDirection GetStepDirection() const { return x8_d...
      method GetStepType (line 59) | constexpr pas::EStepType GetStepType() const { return xc_type; }
    class CBCJumpCmd (line 62) | class CBCJumpCmd : public CBodyStateCmd {
      method CBCJumpCmd (line 70) | constexpr explicit CBCJumpCmd() : CBodyStateCmd(EBodyStateCmd::Jump) {}
      method CBCJumpCmd (line 71) | constexpr explicit CBCJumpCmd(const zeus::CVector3f& wp1, pas::EJump...
      method CBCJumpCmd (line 73) | constexpr explicit CBCJumpCmd(const zeus::CVector3f& wp1, const zeus...
      method GetJumpType (line 75) | constexpr pas::EJumpType GetJumpType() const { return x8_type; }
      method IsWallJump (line 78) | constexpr bool IsWallJump() const { return x24_24_wallJump; }
      method StartInJumpLoop (line 79) | constexpr bool StartInJumpLoop() const { return x24_25_startInJumpLo...
    class CBCGenerateCmd (line 82) | class CBCGenerateCmd : public CBodyStateCmd {
      method CBCGenerateCmd (line 90) | constexpr explicit CBCGenerateCmd() : CBodyStateCmd(EBodyStateCmd::G...
      method CBCGenerateCmd (line 91) | constexpr explicit CBCGenerateCmd(pas::EGenerateType type) : CBodySt...
      method CBCGenerateCmd (line 92) | constexpr explicit CBCGenerateCmd(pas::EGenerateType type, s32 animId)
      method CBCGenerateCmd (line 94) | constexpr explicit CBCGenerateCmd(pas::EGenerateType type, const zeu...
      method GetGenerateType (line 101) | constexpr pas::EGenerateType GetGenerateType() const { return x8_typ...
      method HasExitTargetPos (line 103) | constexpr bool HasExitTargetPos() const { return x1c_24_targetTransf...
      method s32 (line 104) | constexpr s32 GetSpecialAnimId() const { return x18_animId; }
      method UseSpecialAnimId (line 105) | constexpr bool UseSpecialAnimId() const { return x1c_25_overrideAnim; }
    class CBCKnockBackCmd (line 108) | class CBCKnockBackCmd : public CBodyStateCmd {
      method CBCKnockBackCmd (line 113) | constexpr explicit CBCKnockBackCmd() : CBodyStateCmd(EBodyStateCmd::...
      method CBCKnockBackCmd (line 114) | constexpr explicit CBCKnockBackCmd(const zeus::CVector3f& vec, pas::...
      method GetHitSeverity (line 117) | constexpr pas::ESeverity GetHitSeverity() const { return x14_severit...
    class CBCHurledCmd (line 120) | class CBCHurledCmd : public CBodyStateCmd {
      method CBCHurledCmd (line 126) | constexpr explicit CBCHurledCmd() : CBodyStateCmd(EBodyStateCmd::Hur...
      method CBCHurledCmd (line 127) | constexpr explicit CBCHurledCmd(const zeus::CVector3f& dir, const ze...
      method GetSkipLaunchState (line 135) | constexpr bool GetSkipLaunchState() const { return x20_startInKnockL...
      method SetSkipLaunchState (line 136) | constexpr void SetSkipLaunchState(bool s) { x20_startInKnockLoop = s; }
    class CBCGetupCmd (line 139) | class CBCGetupCmd : public CBodyStateCmd {
      method CBCGetupCmd (line 143) | constexpr explicit CBCGetupCmd() : CBodyStateCmd(EBodyStateCmd::Getu...
      method CBCGetupCmd (line 144) | constexpr explicit CBCGetupCmd(pas::EGetupType type) : CBodyStateCmd...
      method GetGetupType (line 145) | constexpr pas::EGetupType GetGetupType() const { return x8_type; }
    class CBCLoopReactionCmd (line 148) | class CBCLoopReactionCmd : public CBodyStateCmd {
      method CBCLoopReactionCmd (line 152) | constexpr explicit CBCLoopReactionCmd() : CBodyStateCmd(EBodyStateCm...
      method CBCLoopReactionCmd (line 153) | constexpr explicit CBCLoopReactionCmd(pas::EReactionType type)
      method GetReactionType (line 155) | constexpr pas::EReactionType GetReactionType() const { return x8_typ...
    class CBCLoopHitReactionCmd (line 158) | class CBCLoopHitReactionCmd : public CBodyStateCmd {
      method CBCLoopHitReactionCmd (line 162) | constexpr explicit CBCLoopHitReactionCmd() : CBodyStateCmd(EBodyStat...
      method CBCLoopHitReactionCmd (line 163) | constexpr explicit CBCLoopHitReactionCmd(pas::EReactionType type)
      method GetReactionType (line 165) | constexpr pas::EReactionType GetReactionType() const { return x8_typ...
    class CBCKnockDownCmd (line 168) | class CBCKnockDownCmd : public CBodyStateCmd {
      method CBCKnockDownCmd (line 173) | constexpr explicit CBCKnockDownCmd() : CBodyStateCmd(EBodyStateCmd::...
      method CBCKnockDownCmd (line 174) | constexpr explicit CBCKnockDownCmd(const zeus::CVector3f& vec, pas::...
      method GetHitSeverity (line 177) | constexpr pas::ESeverity GetHitSeverity() const { return x14_severit...
    class CBCSlideCmd (line 180) | class CBCSlideCmd : public CBodyStateCmd {
      method CBCSlideCmd (line 185) | constexpr explicit CBCSlideCmd() : CBodyStateCmd(EBodyStateCmd::Slid...
      method CBCSlideCmd (line 186) | constexpr explicit CBCSlideCmd(pas::ESlideType type, const zeus::CVe...
      method GetSlideType (line 188) | constexpr pas::ESlideType GetSlideType() const { return x8_type; }
    class CBCScriptedCmd (line 192) | class CBCScriptedCmd : public CBodyStateCmd {
      method CBCScriptedCmd (line 199) | constexpr explicit CBCScriptedCmd() : CBodyStateCmd(EBodyStateCmd::S...
      method CBCScriptedCmd (line 200) | constexpr explicit CBCScriptedCmd(int i, bool b1, bool b2, float f)
      method s32 (line 202) | constexpr s32 GetAnimId() const { return x8_anim; }
      method IsLooped (line 203) | constexpr bool IsLooped() const { return xc_24_loopAnim; }
      method GetUseLoopDuration (line 204) | constexpr bool GetUseLoopDuration() const { return xc_25_timedLoop; }
      method GetLoopDuration (line 205) | constexpr float GetLoopDuration() const { return x10_loopDur; }
    class CBCCoverCmd (line 208) | class CBCCoverCmd : public CBodyStateCmd {
      method CBCCoverCmd (line 214) | constexpr explicit CBCCoverCmd() : CBodyStateCmd(EBodyStateCmd::Cove...
      method CBCCoverCmd (line 215) | constexpr explicit CBCCoverCmd(pas::ECoverDirection dir, const zeus:...
      method GetDirection (line 217) | constexpr pas::ECoverDirection GetDirection() const { return x8_dir; }
    class CBCWallHangCmd (line 222) | class CBCWallHangCmd : public CBodyStateCmd {
      method CBCWallHangCmd (line 226) | constexpr explicit CBCWallHangCmd() : CBodyStateCmd(EBodyStateCmd::W...
      method CBCWallHangCmd (line 227) | constexpr explicit CBCWallHangCmd(TUniqueId uid) : CBodyStateCmd(EBo...
      method TUniqueId (line 228) | constexpr TUniqueId GetTarget() const { return x8_wpId; }
    class CBCAdditiveAimCmd (line 231) | class CBCAdditiveAimCmd : public CBodyStateCmd {
      method CBCAdditiveAimCmd (line 233) | constexpr explicit CBCAdditiveAimCmd() : CBodyStateCmd(EBodyStateCmd...
    class CBCAdditiveFlinchCmd (line 236) | class CBCAdditiveFlinchCmd : public CBodyStateCmd {
      method CBCAdditiveFlinchCmd (line 240) | constexpr explicit CBCAdditiveFlinchCmd() : CBodyStateCmd(EBodyState...
      method CBCAdditiveFlinchCmd (line 241) | constexpr explicit CBCAdditiveFlinchCmd(float f) : CBodyStateCmd(EBo...
      method GetWeight (line 242) | constexpr float GetWeight() const { return x8_weight; }
    class CBCAdditiveReactionCmd (line 245) | class CBCAdditiveReactionCmd : public CBodyStateCmd {
      method CBCAdditiveReactionCmd (line 251) | constexpr explicit CBCAdditiveReactionCmd() : CBodyStateCmd(EBodySta...
      method CBCAdditiveReactionCmd (line 252) | constexpr explicit CBCAdditiveReactionCmd(pas::EAdditiveReactionType...
      method GetType (line 254) | constexpr pas::EAdditiveReactionType GetType() const { return xc_typ...
      method GetWeight (line 255) | constexpr float GetWeight() const { return x8_weight; }
      method GetIsActive (line 256) | constexpr bool GetIsActive() const { return x10_active; }
    class CBCLoopAttackCmd (line 259) | class CBCLoopAttackCmd : public CBodyStateCmd {
      method CBCLoopAttackCmd (line 264) | constexpr explicit CBCLoopAttackCmd() : CBodyStateCmd(EBodyStateCmd:...
      method CBCLoopAttackCmd (line 265) | constexpr explicit CBCLoopAttackCmd(pas::ELoopAttackType type, bool ...
      method GetAttackType (line 267) | constexpr pas::ELoopAttackType GetAttackType() const { return x8_typ...
      method WaitForAnimOver (line 268) | constexpr bool WaitForAnimOver() const { return xc_waitForAnimOver; }
    class CBCTauntCmd (line 271) | class CBCTauntCmd : public CBodyStateCmd {
      method CBCTauntCmd (line 275) | constexpr explicit CBCTauntCmd() : CBodyStateCmd(EBodyStateCmd::Taun...
      method CBCTauntCmd (line 276) | constexpr explicit CBCTauntCmd(pas::ETauntType type) : CBodyStateCmd...
      method GetTauntType (line 277) | constexpr pas::ETauntType GetTauntType() const { return x8_type; }
    class CBCLocomotionCmd (line 280) | class CBCLocomotionCmd {
      method CBCLocomotionCmd (line 286) | constexpr explicit CBCLocomotionCmd(const zeus::CVector3f& move, con...
      method GetWeight (line 290) | constexpr float GetWeight() const { return x18_weight; }
    type ESteeringBlendMode (line 293) | enum class ESteeringBlendMode { Normal, FullSpeed, Clamped }
    class CBodyStateCmdMgr (line 295) | class CBodyStateCmdMgr {
      method DeliverCmd (line 334) | void DeliverCmd(EBodyStateCmd cmd) { xb4_deliveredCmdMask |= (1 << i...
      method DeliverCmd (line 338) | void DeliverCmd(const CBodyStateCmd& cmd) {
      method DeliverCmd (line 342) | void DeliverCmd(const CBCGetupCmd& cmd) {
      method DeliverCmd (line 346) | void DeliverCmd(const CBCStepCmd& cmd) {
      method DeliverCmd (line 350) | void DeliverCmd(const CBCKnockDownCmd& cmd) {
      method DeliverCmd (line 354) | void DeliverCmd(const CBCKnockBackCmd& cmd) {
      method DeliverCmd (line 358) | void DeliverCmd(const CBCMeleeAttackCmd& cmd) {
      method DeliverCmd (line 362) | void DeliverCmd(const CBCProjectileAttackCmd& cmd) {
      method DeliverCmd (line 366) | void DeliverCmd(const CBCLoopAttackCmd& cmd) {
      method DeliverCmd (line 370) | void DeliverCmd(const CBCLoopReactionCmd& cmd) {
      method DeliverCmd (line 374) | void DeliverCmd(const CBCLoopHitReactionCmd& cmd) {
      method DeliverCmd (line 378) | void DeliverCmd(const CBCGenerateCmd& cmd) {
      method DeliverCmd (line 382) | void DeliverCmd(const CBCHurledCmd& cmd) {
      method DeliverCmd (line 386) | void DeliverCmd(const CBCJumpCmd& cmd) {
      method DeliverCmd (line 390) | void DeliverCmd(const CBCSlideCmd& cmd) {
      method DeliverCmd (line 394) | void DeliverCmd(const CBCTauntCmd& cmd) {
      method DeliverCmd (line 398) | void DeliverCmd(const CBCScriptedCmd& cmd) {
      method DeliverCmd (line 402) | void DeliverCmd(const CBCCoverCmd& cmd) {
      method DeliverCmd (line 406) | void DeliverCmd(const CBCWallHangCmd& cmd) {
      method DeliverCmd (line 410) | void DeliverCmd(const CBCAdditiveAimCmd& cmd) {
      method DeliverCmd (line 414) | void DeliverCmd(const CBCAdditiveFlinchCmd& cmd) {
      method DeliverCmd (line 418) | void DeliverCmd(const CBCAdditiveReactionCmd& cmd) {
      method DeliverFaceVector (line 423) | void DeliverFaceVector(const zeus::CVector3f& f) { xc_face = f; }
      method DeliverTargetVector (line 424) | void DeliverTargetVector(const zeus::CVector3f& t) { x18_target = t; }
      method DeliverAdditiveTargetVector (line 425) | void DeliverAdditiveTargetVector(const zeus::CVector3f& t) { x24_add...
      method SetSteeringBlendSpeed (line 426) | void SetSteeringBlendSpeed(float s) { x3c_steeringSpeed = s; }
      method SetSteeringBlendMode (line 427) | void SetSteeringBlendMode(ESteeringBlendMode m) { x30_steeringMode =...
      method SetSteeringSpeedRange (line 428) | void SetSteeringSpeedRange(float rmin, float rmax) {
      method CBodyStateCmd (line 436) | CBodyStateCmd* GetCmd(EBodyStateCmd cmd) {
      method CBodyStateCmd (line 442) | const CBodyStateCmd* GetCmd(EBodyStateCmd cmd) const {

FILE: Runtime/Character/CBodyStateInfo.cpp
  type metaforce (line 6) | namespace metaforce {
    function CBodyState (line 397) | CBodyState* CBodyStateInfo::GetCurrentState() {
    function CBodyState (line 404) | const CBodyState* CBodyStateInfo::GetCurrentState() const {
    function CAdditiveBodyState (line 418) | CAdditiveBodyState* CBodyStateInfo::GetCurrentAdditiveState() {

FILE: Runtime/Character/CBodyStateInfo.hpp
  type metaforce (line 13) | namespace metaforce {
    class CActor (line 14) | class CActor
    class CBodyStateInfo (line 16) | class CBodyStateInfo {
      method GetMaximumPitch (line 37) | float GetMaximumPitch() const { return x30_maxPitch; }
      method SetMaximumPitch (line 38) | void SetMaximumPitch(float pitch) { x30_maxPitch = pitch; }
      method GetLocoAnimChangeAtEndOfAnimOnly (line 39) | bool GetLocoAnimChangeAtEndOfAnimOnly() const { return x34_24_change...
      method SetLocoAnimChangeAtEndOfAnimOnly (line 40) | void SetLocoAnimChangeAtEndOfAnimOnly(bool s) { x34_24_changeLocoAtE...
      method GetCurrentStateId (line 43) | pas::EAnimationState GetCurrentStateId() const { return x14_state; }
      method GetCurrentAdditiveStateId (line 46) | pas::EAnimationState GetCurrentAdditiveStateId() const { return x2c_...

FILE: Runtime/Character/CBoneTracking.cpp
  type metaforce (line 11) | namespace metaforce {

FILE: Runtime/Character/CBoneTracking.hpp
  type metaforce (line 13) | namespace metaforce {
    class CAnimData (line 14) | class CAnimData
    class CStateManager (line 15) | class CStateManager
    class CBodyController (line 16) | class CBodyController
    type EBoneTrackingFlags (line 18) | enum class EBoneTrackingFlags { None = 0, NoParent = 1, NoParentOrigin...
    class CBoneTracking (line 21) | class CBoneTracking {

FILE: Runtime/Character/CBoolPOINode.cpp
  type metaforce (line 5) | namespace metaforce {
    function CBoolPOINode (line 11) | CBoolPOINode CBoolPOINode::CopyNodeMinusStartTime(const CBoolPOINode& ...

FILE: Runtime/Character/CBoolPOINode.hpp
  type metaforce (line 5) | namespace metaforce {
    class IAnimSourceInfo (line 6) | class IAnimSourceInfo
    class CBoolPOINode (line 8) | class CBoolPOINode : public CPOINode {
      method GetValue (line 14) | bool GetValue() const { return x38_val; }

FILE: Runtime/Character/CCharAnimTime.cpp
  type metaforce (line 6) | namespace metaforce {
    function CCharAnimTime (line 108) | CCharAnimTime& CCharAnimTime::operator*=(const CCharAnimTime& other) {...
    function CCharAnimTime (line 110) | CCharAnimTime& CCharAnimTime::operator+=(const CCharAnimTime& other) {...
    function CCharAnimTime (line 112) | CCharAnimTime CCharAnimTime::operator+(const CCharAnimTime& other) con...
    function CCharAnimTime (line 146) | CCharAnimTime& CCharAnimTime::operator-=(const CCharAnimTime& other) {...
    function CCharAnimTime (line 148) | CCharAnimTime CCharAnimTime::operator-(const CCharAnimTime& other) con...
    function CCharAnimTime (line 187) | CCharAnimTime CCharAnimTime::operator*(const CCharAnimTime& other) con...
    function CCharAnimTime (line 227) | CCharAnimTime CCharAnimTime::operator*(const float& other) const {

FILE: Runtime/Character/CCharAnimTime.hpp
  type metaforce (line 8) | namespace metaforce {
    class CCharAnimTime (line 10) | class CCharAnimTime {
      type EType (line 12) | enum class EType { NonZero, ZeroIncreasing, ZeroSteady, ZeroDecreasi...
      method CCharAnimTime (line 19) | constexpr CCharAnimTime() = default;
      method CCharAnimTime (line 20) | constexpr CCharAnimTime(float time) : x0_time(time), x4_type(x0_time...
      method CCharAnimTime (line 21) | constexpr CCharAnimTime(EType type, float t) : x0_time(t), x4_type(t...
      method CCharAnimTime (line 22) | explicit CCharAnimTime(CInputStream& in) : x0_time(in.ReadFloat()), ...
      method CCharAnimTime (line 24) | static constexpr CCharAnimTime Infinity() { return {EType::Infinity,...
      method GetSeconds (line 25) | float GetSeconds() const { return x0_time; }

FILE: Runtime/Character/CCharLayoutInfo.cpp
  type metaforce (line 5) | namespace metaforce {
    function CSegId (line 23) | CSegId CCharLayoutInfo::GetSegIdFromString(std::string_view name) const {
    function CFactoryFnReturn (line 63) | CFactoryFnReturn FCharLayoutInfo(const SObjectTag&, CInputStream& in, ...

FILE: Runtime/Character/CCharLayoutInfo.hpp
  type metaforce (line 16) | namespace metaforce {
    class CCharLayoutNode (line 18) | class CCharLayoutNode {
      type Bone (line 20) | struct Bone {
    class CCharLayoutInfo (line 35) | class CCharLayoutInfo {
      method CSegIdList (line 43) | const CSegIdList& GetSegIdList() const { return x8_segIdList; }

FILE: Runtime/Character/CCharacterFactory.cpp
  type metaforce (line 18) | namespace metaforce {
    function CFactoryFnReturn (line 20) | CFactoryFnReturn CCharacterFactory::CDummyFactory::Build(const SObject...
    function SObjectTag (line 48) | const SObjectTag* CCharacterFactory::CDummyFactory::GetResourceIdByNam...
    function FourCC (line 50) | FourCC CCharacterFactory::CDummyFactory::GetResourceTypeById(CAssetId ...
    function u32 (line 56) | u32 CCharacterFactory::CDummyFactory::ResourceSize(const metaforce::SO...
    function CAssetId (line 95) | CAssetId CCharacterFactory::GetEventResourceIdForAnimResourceId(CAsset...
    function CAdditiveAnimationInfo (line 103) | const CAdditiveAnimationInfo& CCharacterFactory::FindAdditiveInfo(s32 ...

FILE: Runtime/Character/CCharacterFactory.hpp
  type metaforce (line 15) | namespace metaforce {
    class CAdditiveAnimationInfo (line 16) | class CAdditiveAnimationInfo
    class CAllFormatsAnimSource (line 17) | class CAllFormatsAnimSource
    class CAnimCharacterSet (line 18) | class CAnimCharacterSet
    class CAnimData (line 19) | class CAnimData
    class CAnimationManager (line 20) | class CAnimationManager
    class CCharLayoutInfo (line 21) | class CCharLayoutInfo
    class CSimplePool (line 22) | class CSimplePool
    class CTransitionDatabaseGame (line 23) | class CTransitionDatabaseGame
    class CTransitionManager (line 24) | class CTransitionManager
    class CCharacterFactory (line 26) | class CCharacterFactory : public IObjFactory {
      class CDummyFactory (line 28) | class CDummyFactory : public IFactory {
      method CCharacterInfo (line 74) | const CCharacterInfo& GetCharInfo(int charIdx) const { return x4_cha...

FILE: Runtime/Character/CCharacterInfo.cpp
  type metaforce (line 4) | namespace metaforce {
    function MakeAnimInfoVector (line 34) | static std::vector<std::pair<s32, std::pair<std::string, std::string>>...
    function s32 (line 96) | s32 CCharacterInfo::GetAnimationIndex(std::string_view name) const {

FILE: Runtime/Character/CCharacterInfo.hpp
  type metaforce (line 14) | namespace metaforce {
    class CCharacterInfo (line 16) | class CCharacterInfo {
      type CParticleResData (line 20) | struct CParticleResData {
        method CParticleResData (line 26) | CParticleResData(std::vector<CAssetId> part, std::vector<CAssetId>...
      method GetCharacterName (line 52) | std::string_view GetCharacterName() const { return x4_name; }
      method CAssetId (line 53) | CAssetId GetModelId() const { return x14_cmdl; }
      method CAssetId (line 54) | CAssetId GetSkinRulesId() const { return x18_cskr; }
      method CAssetId (line 55) | CAssetId GetCharLayoutInfoId() const { return x1c_cinf; }
      method CAssetId (line 62) | CAssetId GetIceModelId() const { return xa8_cmdlOverlay; }
      method CAssetId (line 63) | CAssetId GetIceSkinRulesId() const { return xac_cskrOverlay; }
      method CParticleResData (line 65) | const CParticleResData& GetParticleResData() const { return x44_part...
        method CParticleResData (line 26) | CParticleResData(std::vector<CAssetId> part, std::vector<CAssetId>...
      method s32 (line 66) | s32 GetAnimationIndex(s32 idx) const { return xb0_animIdxs.at(idx); }
      method CPASDatabase (line 67) | const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; }

FILE: Runtime/Character/CCharacterSet.cpp
  type metaforce (line 3) | namespace metaforce {

FILE: Runtime/Character/CCharacterSet.hpp
  type metaforce (line 9) | namespace metaforce {
    class CCharacterSet (line 11) | class CCharacterSet {

FILE: Runtime/Character/CEffectComponent.cpp
  type metaforce (line 3) | namespace metaforce {
    function SObjectTag (line 5) | SObjectTag CEffectComponent::GetSObjectTagFromStream(CInputStream& in)...

FILE: Runtime/Character/CEffectComponent.hpp
  type metaforce (line 9) | namespace metaforce {
    class CEffectComponent (line 11) | class CEffectComponent {
      method GetComponentName (line 23) | std::string_view GetComponentName() const { return x0_name; }
      method SObjectTag (line 24) | const SObjectTag& GetParticleTag() const { return x10_tag; }
      method GetSegmentName (line 25) | std::string_view GetSegmentName() const { return x18_boneName; }
      method GetScale (line 26) | float GetScale() const { return x28_scale; }
      method GetParentedMode (line 27) | CParticleData::EParentedMode GetParentedMode() const { return x2c_pa...
      method u32 (line 28) | u32 GetFlags() const { return x30_flags; }

FILE: Runtime/Character/CFBStreamedAnimReader.cpp
  type metaforce (line 11) | namespace metaforce {
    function u32 (line 244) | u32 CBitLevelLoader::LoadUnsigned(u8 q) {
    function s32 (line 268) | s32 CBitLevelLoader::LoadSigned(u8 q) {
    function SAdvancementResults (line 362) | SAdvancementResults CFBStreamedAnimReader::VGetAdvancementResults(cons...
    function SAdvancementResults (line 408) | SAdvancementResults CFBStreamedAnimReader::VReverseView(const CCharAni...
    function SAdvancementResults (line 441) | SAdvancementResults CFBStreamedAnimReader::VAdvanceView(const CCharAni...
    function CCharAnimTime (line 483) | CCharAnimTime CFBStreamedAnimReader::VGetTimeRemaining() const {
    function CSteadyStateAnimInfo (line 487) | CSteadyStateAnimInfo CFBStreamedAnimReader::VGetSteadyStateAnimInfo() ...
    class TAnimSourceInfo<CFBStreamedCompression> (line 509) | class TAnimSourceInfo<CFBStreamedCompression>

FILE: Runtime/Character/CFBStreamedAnimReader.hpp
  type metaforce (line 9) | namespace metaforce {
    class CBitLevelLoader (line 10) | class CBitLevelLoader
      method CBitLevelLoader (line 79) | explicit CBitLevelLoader(const void* data) : m_data(reinterpret_cast...
      method Reset (line 80) | void Reset() { m_bitIdx = 0; }
      method GetCurBit (line 84) | size_t GetCurBit() const { return m_bitIdx; }
    class TAnimSourceInfo (line 13) | class TAnimSourceInfo : public IAnimSourceInfo {
      method TAnimSourceInfo (line 17) | explicit TAnimSourceInfo(TSubAnimTypeToken<T> token) : x4_token(std:...
      method HasPOIData (line 18) | bool HasPOIData() const override { return x4_token->HasPOIData(); }
      method CCharAnimTime (line 25) | CCharAnimTime GetAnimationDuration() const override { return x4_toke...
    class CFBStreamedAnimReaderTotals (line 28) | class CFBStreamedAnimReaderTotals {
      method IsCalculated (line 49) | bool IsCalculated() const { return x20_calculated; }
    class CFBStreamedPairOfTotals (line 53) | class CFBStreamedPairOfTotals {
      method GetT (line 67) | float GetT() const { return x78_t; }
      method CFBStreamedAnimReaderTotals (line 68) | CFBStreamedAnimReaderTotals& Next() { return x10_nextSel ? x3c_b : x...
      method CFBStreamedAnimReaderTotals (line 69) | CFBStreamedAnimReaderTotals& Prior() { return x10_nextSel ? x14_a : ...
      method CFBStreamedAnimReaderTotals (line 70) | const CFBStreamedAnimReaderTotals& Next() const { return x10_nextSel...
      method CFBStreamedAnimReaderTotals (line 71) | const CFBStreamedAnimReaderTotals& Prior() const { return x10_nextSe...
    class CBitLevelLoader (line 74) | class CBitLevelLoader {
      method CBitLevelLoader (line 79) | explicit CBitLevelLoader(const void* data) : m_data(reinterpret_cast...
      method Reset (line 80) | void Reset() { m_bitIdx = 0; }
      method GetCurBit (line 84) | size_t GetCurBit() const { return m_bitIdx; }
    class CSegIdToIndexConverter (line 87) | class CSegIdToIndexConverter {
      method s32 (line 92) | s32 SegIdToIndex(const CSegId& id) const { return x0_indices[id]; }
    class CFBStreamedAnimReader (line 95) | class CFBStreamedAnimReader : public CAnimSourceReaderBase {
      method VSupportsReverseView (line 110) | bool VSupportsReverseView() const override { return false; }

FILE: Runtime/Character/CFBStreamedCompression.cpp
  type metaforce (line 7) | namespace metaforce {
    function T (line 10) | T ReadValue(const u8* data) {
    function WriteValue (line 19) | void WriteValue(u8* data, T value) {
    function u32 (line 37) | const u32* CFBStreamedCompression::GetTimes() const { return xc_rotsAn...
    function u8 (line 39) | const u8* CFBStreamedCompression::GetPerChannelHeaders() const {
    function u8 (line 45) | const u8* CFBStreamedCompression::GetBitstreamPointer() const {
    function u8 (line 108) | u8* CFBStreamedCompression::ReadBoneChannelDescriptors(u8* out, CInput...
    function u32 (line 170) | u32 CFBStreamedCompression::ComputeBitstreamWords(const u8* chans) con...

FILE: Runtime/Character/CFBStreamedCompression.hpp
  type metaforce (line 12) | namespace metaforce {
    class IObjectStore (line 13) | class IObjectStore
    class CFBStreamedCompression (line 15) | class CFBStreamedCompression {
      type Header (line 21) | struct Header {
        method read (line 32) | void read(CInputStream& in) {
      method Header (line 70) | const Header& MainHeader() const { return *reinterpret_cast<const He...
        method read (line 32) | void read(CInputStream& in) {
      method IsLooping (line 74) | bool IsLooping() const { return MainHeader().looping; }
      method CCharAnimTime (line 75) | CCharAnimTime GetAnimationDuration() const { return MainHeader().dur...
      method GetAverageVelocity (line 76) | float GetAverageVelocity() const { return x10_averageVelocity; }
      method HasPOIData (line 78) | bool HasPOIData() const { return x8_evntToken.HasReference(); }

FILE: Runtime/Character/CGroundMovement.cpp
  type metaforce (line 16) | namespace metaforce {
    function RemovePositiveZComponentFromNormal (line 629) | static bool RemovePositiveZComponentFromNormal(zeus::CVector3f& vec) {
    function CMaterialList (line 638) | CMaterialList CGroundMovement::MoveObjectAnalytical(CStateManager& mgr...

FILE: Runtime/Character/CGroundMovement.hpp
  type metaforce (line 11) | namespace metaforce {
    class CAreaCollisionCache (line 12) | class CAreaCollisionCache
    class CCollisionInfoList (line 13) | class CCollisionInfoList
    class CMaterialFilter (line 14) | class CMaterialFilter
    class CPhysicsActor (line 15) | class CPhysicsActor
    class CStateManager (line 16) | class CStateManager
    class CGroundMovement (line 18) | class CGroundMovement {
      type SMovementOptions (line 20) | struct SMovementOptions {
      type SMoveObjectResult (line 41) | struct SMoveObjectResult {

FILE: Runtime/Character/CHalfTransition.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CHalfTransition.hpp
  type metaforce (line 9) | namespace metaforce {
    class CHalfTransition (line 11) | class CHalfTransition {
      method u32 (line 17) | u32 GetId() const { return x0_id; }

FILE: Runtime/Character/CHierarchyPoseBuilder.cpp
  type metaforce (line 8) | namespace metaforce {

FILE: Runtime/Character/CHierarchyPoseBuilder.hpp
  type metaforce (line 10) | namespace metaforce {
    class CCharLayoutInfo (line 11) | class CCharLayoutInfo
    class CLayoutDescription (line 12) | class CLayoutDescription
    class CPoseAsTransforms (line 13) | class CPoseAsTransforms
    class CHierarchyPoseBuilder (line 15) | class CHierarchyPoseBuilder {
      type CTreeNode (line 17) | struct CTreeNode {
      method HasRoot (line 42) | bool HasRoot() const { return x34_hasRoot; }

FILE: Runtime/Character/CIkChain.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CIkChain.hpp
  type metaforce (line 10) | namespace metaforce {
    class CAnimData (line 11) | class CAnimData
    class CSegId (line 12) | class CSegId
    class CIkChain (line 13) | class CIkChain {
      method CIkChain (line 27) | CIkChain() = default;
      method GetActive (line 29) | bool GetActive() const { return x44_24_activated; }

FILE: Runtime/Character/CInt32POINode.cpp
  type metaforce (line 5) | namespace metaforce {
    function CInt32POINode (line 16) | CInt32POINode CInt32POINode::CopyNodeMinusStartTime(const CInt32POINod...

FILE: Runtime/Character/CInt32POINode.hpp
  type metaforce (line 8) | namespace metaforce {
    class IAnimSourceInfo (line 9) | class IAnimSourceInfo
    class CInt32POINode (line 11) | class CInt32POINode : public CPOINode {
      method s32 (line 19) | s32 GetValue() const { return x38_val; }
      method GetLocatorName (line 20) | std::string_view GetLocatorName() const { return x3c_locatorName; }

FILE: Runtime/Character/CLayoutDescription.hpp
  type metaforce (line 9) | namespace metaforce {
    class CCharLayoutInfo (line 10) | class CCharLayoutInfo
    class CLayoutDescription (line 12) | class CLayoutDescription {
      class CScaledLayoutDescription (line 14) | class CScaledLayoutDescription {
        method GlobalScale (line 21) | float GlobalScale() const { return xc_scale; }
      method CLayoutDescription (line 30) | explicit CLayoutDescription(const TLockedToken<CCharLayoutInfo>& tok...
      method UsesScale (line 35) | bool UsesScale() const { return bool(xc_scaled); }

FILE: Runtime/Character/CMetaAnimBlend.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimBlend.hpp
  type metaforce (line 8) | namespace metaforce {
    class CMetaAnimBlend (line 10) | class CMetaAnimBlend : public IMetaAnim {
      method EMetaAnimType (line 18) | EMetaAnimType GetType() const override { return EMetaAnimType::Blend; }

FILE: Runtime/Character/CMetaAnimFactory.cpp
  type metaforce (line 9) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimFactory.hpp
  type metaforce (line 8) | namespace metaforce {
    class CMetaAnimFactory (line 10) | class CMetaAnimFactory {

FILE: Runtime/Character/CMetaAnimPhaseBlend.cpp
  type metaforce (line 7) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimPhaseBlend.hpp
  type metaforce (line 8) | namespace metaforce {
    class CMetaAnimPhaseBlend (line 10) | class CMetaAnimPhaseBlend : public IMetaAnim {
      method EMetaAnimType (line 18) | EMetaAnimType GetType() const override { return EMetaAnimType::Phase...

FILE: Runtime/Character/CMetaAnimPlay.cpp
  type metaforce (line 8) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimPlay.hpp
  type metaforce (line 7) | namespace metaforce {
    class CMetaAnimPlay (line 9) | class CMetaAnimPlay : public IMetaAnim {
      method EMetaAnimType (line 15) | EMetaAnimType GetType() const override { return EMetaAnimType::Play; }

FILE: Runtime/Character/CMetaAnimRandom.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimRandom.hpp
  type metaforce (line 10) | namespace metaforce {
    class CMetaAnimRandom (line 12) | class CMetaAnimRandom : public IMetaAnim {
      method EMetaAnimType (line 19) | EMetaAnimType GetType() const override { return EMetaAnimType::Rando...

FILE: Runtime/Character/CMetaAnimSequence.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Character/CMetaAnimSequence.hpp
  type metaforce (line 9) | namespace metaforce {
    class CMetaAnimSequence (line 11) | class CMetaAnimSequence : public IMetaAnim {
      method EMetaAnimType (line 17) | EMetaAnimType GetType() const override { return EMetaAnimType::Seque...

FILE: Runtime/Character/CMetaTransFactory.cpp
  type metaforce (line 8) | namespace metaforce {

FILE: Runtime/Character/CMetaTransFactory.hpp
  type metaforce (line 8) | namespace metaforce {
    class CMetaTransFactory (line 10) | class CMetaTransFactory {

FILE: Runtime/Character/CMetaTransMetaAnim.cpp
  type metaforce (line 6) | namespace metaforce {

FILE: Runtime/Character/CMetaTransMetaAnim.hpp
  type metaforce (line 9) | namespace metaforce {
    class CMetaTransMetaAnim (line 11) | class CMetaTransMetaAnim : public IMetaTrans {
      method EMetaTransType (line 16) | EMetaTransType GetType() const override { return EMetaTransType::Met...

FILE: Runtime/Character/CMetaTransPhaseTrans.cpp
  type metaforce (line 8) | namespace metaforce {

FILE: Runtime/Character/CMetaTransPhaseTrans.hpp
  type metaforce (line 7) | namespace metaforce {
    class CMetaTransPhaseTrans (line 9) | class CMetaTransPhaseTrans : public IMetaTrans {
      method EMetaTransType (line 17) | EMetaTransType GetType() const override { return EMetaTransType::Pha...

FILE: Runtime/Character/CMetaTransSnap.cpp
  type metaforce (line 3) | namespace metaforce {

FILE: Runtime/Character/CMetaTransSnap.hpp
  type metaforce (line 6) | namespace metaforce {
    class CMetaTransSnap (line 8) | class CMetaTransSnap : public IMetaTrans {
      method EMetaTransType (line 10) | EMetaTransType GetType() const override { return EMetaTransType::Sna...

FILE: Runtime/Character/CMetaTransTrans.cpp
  type metaforce (line 5) | namespace metaforce {

FILE: Runtime/Character/CMetaTransTrans.hpp
  type metaforce (line 7) | namespace metaforce {
    class CMetaTransTrans (line 9) | class CMetaTransTrans : public IMetaTrans {
      method EMetaTransType (line 17) | EMetaTransType GetType() const override { return EMetaTransType::Tra...

FILE: Runtime/Character/CModelData.cpp
  type metaforce (line 19) | namespace metaforce {
    function CModelData (line 23) | CModelData CModelData::CModelDataNull() { return CModelData(); }
    function SAdvancementDeltas (line 36) | SAdvancementDeltas CModelData::GetAdvancementDeltas(const CCharAnimTim...
    function u32 (line 73) | u32 CModelData::GetNumMaterialSets() const {
    function CSkinnedModel (line 96) | CSkinnedModel& CModelData::PickAnimatedModel(EWhichModel which) const {
    function SAdvancementDeltas (line 242) | SAdvancementDeltas CModelData::AdvanceAnimationIgnoreParticles(float d...
    function SAdvancementDeltas (line 249) | SAdvancementDeltas CModelData::AdvanceAnimation(float dt, CStateManage...

FILE: Runtime/Character/CModelData.hpp
  type metaforce (line 14) | namespace metaforce {
    class CActorLights (line 15) | class CActorLights
    class CAnimData (line 16) | class CAnimData
    class CCharAnimTime (line 17) | class CCharAnimTime
    class CModel (line 18) |
Condensed preview — 1318 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,292K chars).
[
  {
    "path": ".clang-format",
    "chars": 784,
    "preview": "---\nBasedOnStyle: LLVM\nColumnLimit: 120\nUseTab: Never\nTabWidth: 2\n---\nLanguage: Cpp\nDerivePointerAlignment: false\nPointe"
  },
  {
    "path": ".clang-tidy",
    "chars": 937,
    "preview": "Checks: >\n  *,\n  -altera-*,\n  -cppcoreguidelines-avoid-magic-numbers,\n  -cppcoreguidelines-avoid-non-const-global-variab"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 443,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 6283,
    "preview": "name: Build\n\non:\n  push:\n    paths-ignore:\n      - '*.md'\n      - '*LICENSE'\n  pull_request:\n\nenv:\n  SCCACHE_GHA_ENABLED"
  },
  {
    "path": ".gitignore",
    "chars": 165,
    "preview": "*.autosave\n*.user\n.buildcache/\n.directory\n.DS_Store\n.idea/\n.vs/\nbuild/\ncmake-build-*/\nCMakeUserPresets.json\ndocs/*\nout/\n"
  },
  {
    "path": ".gitmodules",
    "chars": 1034,
    "preview": "[submodule \"extern/nod\"]\n\tpath = extern/nod\n\turl = https://github.com/encounter/nod.git\n\tbranch = main\n[submodule \"exter"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 18868,
    "preview": "cmake_minimum_required(VERSION 3.25...4.1)\n\nif (NOT CMAKE_BUILD_TYPE)\n  set(CMAKE_BUILD_TYPE \"RelWithDebInfo\" CACHE STRI"
  },
  {
    "path": "CMakePresets.json",
    "chars": 15978,
    "preview": "{\n  \"version\": 2,\n  \"cmakeMinimumRequired\": {\n    \"major\": 3,\n    \"minor\": 20,\n    \"patch\": 0\n  },\n  \"configurePresets\":"
  },
  {
    "path": "LICENSE",
    "chars": 1152,
    "preview": "The MIT License\n\nCopyright (c) 2015-2021 Metaforce Contributors\nOriginal Authors: Jack Andersen and Phillip \"Antidote\" S"
  },
  {
    "path": "NESEmulator/CMakeLists.txt",
    "chars": 1024,
    "preview": "file(GLOB MAPPER_SRCS ../extern/fixNES/mapper/*.c)\nadd_library(NESEmulator CNESEmulator.hpp CNESEmulator.cpp malloc.h\n  "
  },
  {
    "path": "NESEmulator/CNESEmulator.cpp",
    "chars": 21017,
    "preview": "#include \"CNESEmulator.hpp\"\n#include \"CGameState.hpp\"\n#include \"Input/CFinalInput.hpp\"\n#include \"Runtime/Logging.hpp\"\n#i"
  },
  {
    "path": "NESEmulator/CNESEmulator.hpp",
    "chars": 2681,
    "preview": "#pragma once\n\n#include \"RetroTypes.hpp\"\n#include \"zeus/CColor.hpp\"\n//#include \"boo/graphicsdev/IGraphicsDataFactory.hpp\""
  },
  {
    "path": "NESEmulator/apu.c",
    "chars": 133,
    "preview": "#include \"fixNES/apu.c\"\n\nuint32_t apuGetMaxBufSize()\n{\n    return apu.BufSizeBytes;\n}\n\nvoid apuResetPos()\n{\n    apu.curB"
  },
  {
    "path": "NESEmulator/malloc.h",
    "chars": 382,
    "preview": "#ifndef URDE_NESEMULATOR_MALLOC_H\n#define URDE_NESEMULATOR_MALLOC_H\n\n#ifdef __APPLE__\n#include <stdlib.h>\n#elif _WIN32\n#"
  },
  {
    "path": "NESEmulator/ppu.c",
    "chars": 72,
    "preview": "#include \"fixNES/ppu.c\"\n\nuint8_t* ppuGetVRAM()\n{\n    return ppu.VRAM;\n}\n"
  },
  {
    "path": "README.md",
    "chars": 4732,
    "preview": "## Metaforce [![Build Status]][actions] [![Discord Badge]][discord]\n\n[Build Status]: https://github.com/AxioDL/metaforce"
  },
  {
    "path": "Runtime/Audio/CAudioGroupSet.cpp",
    "chars": 1396,
    "preview": "#include \"Runtime/Audio/CAudioGroupSet.hpp\"\n\n#include <cstring>\n\nnamespace metaforce {\n/*\namuse::AudioGroupData CAudioGr"
  },
  {
    "path": "Runtime/Audio/CAudioGroupSet.hpp",
    "chars": 918,
    "preview": "#pragma once\n\n#include <memory>\n#include <string>\n\n#include \"Runtime/CFactoryMgr.hpp\"\n#include \"Runtime/CToken.hpp\"\n#inc"
  },
  {
    "path": "Runtime/Audio/CAudioSys.cpp",
    "chars": 2661,
    "preview": "#include \"Runtime/Audio/CAudioSys.hpp\"\n\n#include <string>\n#include <unordered_map>\n\n#include \"Runtime/CSimplePool.hpp\"\n#"
  },
  {
    "path": "Runtime/Audio/CAudioSys.hpp",
    "chars": 1929,
    "preview": "#pragma once\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/GCNTypes.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n\n//#includ"
  },
  {
    "path": "Runtime/Audio/CMakeLists.txt",
    "chars": 354,
    "preview": "set(AUDIO_SOURCES\n        CAudioSys.hpp CAudioSys.cpp\n        CAudioGroupSet.hpp CAudioGroupSet.cpp\n        CSfxManager."
  },
  {
    "path": "Runtime/Audio/CMidiManager.cpp",
    "chars": 1961,
    "preview": "#include \"Runtime/Audio/CMidiManager.hpp\"\n\n#include \"Runtime/Streams/CInputStream.hpp\"\n\nnamespace metaforce {\n\nstd::unor"
  },
  {
    "path": "Runtime/Audio/CMidiManager.hpp",
    "chars": 2010,
    "preview": "#pragma once\n\n#include <memory>\n\n#include \"Runtime/Audio/CSfxManager.hpp\"\n\nnamespace metaforce {\n\nclass CMidiManager {\np"
  },
  {
    "path": "Runtime/Audio/CSfxManager.cpp",
    "chars": 20251,
    "preview": "#include \"Runtime/Audio/CSfxManager.hpp\"\n#include \"Runtime/Streams/CInputStream.hpp\"\n\n#include \"Runtime/CSimplePool.hpp\""
  },
  {
    "path": "Runtime/Audio/CSfxManager.hpp",
    "chars": 9163,
    "preview": "#pragma once\n\n#include <array>\n#include <memory>\n#include <unordered_set>\n#include <vector>\n\n#include \"SFX/SFX.h\"\n#inclu"
  },
  {
    "path": "Runtime/Audio/CStaticAudioPlayer.cpp",
    "chars": 3428,
    "preview": "#include \"Runtime/Audio/CStaticAudioPlayer.hpp\"\n\n#include \"Runtime/CDvdFile.hpp\"\n#include \"Runtime/CDvdRequest.hpp\"\n\nnam"
  },
  {
    "path": "Runtime/Audio/CStaticAudioPlayer.hpp",
    "chars": 2313,
    "preview": "#pragma once\n\n#include <cstring>\n#include <memory>\n#include <optional>\n#include <vector>\n\n#include \"Runtime/RetroTypes.h"
  },
  {
    "path": "Runtime/Audio/CStreamAudioManager.cpp",
    "chars": 31115,
    "preview": "#include \"Runtime/Audio/CStreamAudioManager.hpp\"\n\n#include \"Runtime/Audio/CAudioSys.hpp\"\n#include \"Runtime/CDvdFile.hpp\""
  },
  {
    "path": "Runtime/Audio/CStreamAudioManager.hpp",
    "chars": 1059,
    "preview": "#pragma once\n\n#include <string_view>\n\n#include \"Runtime/GCNTypes.hpp\"\n\nnamespace metaforce {\n\nclass CStreamAudioManager "
  },
  {
    "path": "Runtime/Audio/SFX/Atomic.h",
    "chars": 573,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Atomic\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/BetaBeetle.h",
    "chars": 847,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: BetaBeetle\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/Bird.h",
    "chars": 285,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Bird\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define "
  },
  {
    "path": "Runtime/Audio/SFX/BloodFlower.h",
    "chars": 709,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: BloodFlower\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/Burrower.h",
    "chars": 655,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Burrower\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/ChozoGhost.h",
    "chars": 1479,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: ChozoGhost\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/ChubbWeed.h",
    "chars": 320,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: ChubbWeed\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/CineBoots.h",
    "chars": 641,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineBoots\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/CineGeneral.h",
    "chars": 1223,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineGeneral\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/CineGun.h",
    "chars": 498,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineGun\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/CineMorphball.h",
    "chars": 390,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineMorphball\n * Date: Sat Sep  1 12:32:04 2018\n */\n"
  },
  {
    "path": "Runtime/Audio/SFX/CineSuit.h",
    "chars": 803,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineSuit\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/CineVisor.h",
    "chars": 437,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: CineVisor\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Crater.h",
    "chars": 856,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Crater\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/Crystallite.h",
    "chars": 381,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Crystallite\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/Drones.h",
    "chars": 1727,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Drones\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/EliteSpacePirate.h",
    "chars": 1614,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: EliteSpacePirate\n * Date: Sat Sep  1 12:32:04 2018\n "
  },
  {
    "path": "Runtime/Audio/SFX/FireFlea.h",
    "chars": 486,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: FireFlea\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/Flaaghra.h",
    "chars": 2394,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Flaaghra\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/FlickerBat.h",
    "chars": 449,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: FlickerBat\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/FlyingPirate.h",
    "chars": 1777,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: FlyingPirate\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n"
  },
  {
    "path": "Runtime/Audio/SFX/FrontEnd.h",
    "chars": 1238,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: FrontEnd\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/GagantuanBeatle.h",
    "chars": 1658,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: GagantuanBeatle\n * Date: Sat Sep  1 12:32:04 2018\n *"
  },
  {
    "path": "Runtime/Audio/SFX/Gnats.h",
    "chars": 295,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Gnats\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define"
  },
  {
    "path": "Runtime/Audio/SFX/Gryzbee.h",
    "chars": 420,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Gryzbee\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/IceCrack.h",
    "chars": 651,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: IceCrack\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/IceWorld.h",
    "chars": 3173,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: IceWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/InjuredPirates.h",
    "chars": 856,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: InjuredPirates\n * Date: Sat Sep  1 12:32:04 2018\n */"
  },
  {
    "path": "Runtime/Audio/SFX/IntroBoss.h",
    "chars": 1185,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: IntroBoss\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/IntroWorld.h",
    "chars": 3555,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: IntroWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/JellyZap.h",
    "chars": 402,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: JellyZap\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/LavaWorld.h",
    "chars": 2734,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: LavaWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Magdolite.h",
    "chars": 888,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Magdolite\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Metaree.h",
    "chars": 417,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Metaree\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/Metroid.h",
    "chars": 1862,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Metroid\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/MetroidPrime.h",
    "chars": 2429,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: MetroidPrime\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n"
  },
  {
    "path": "Runtime/Audio/SFX/MinesWorld.h",
    "chars": 2145,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: MinesWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/Misc.h",
    "chars": 6413,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Misc\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define "
  },
  {
    "path": "Runtime/Audio/SFX/MiscSamus.h",
    "chars": 7811,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: MiscSamus\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/OmegaPirate.h",
    "chars": 1827,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: OmegaPirate\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/OverWorld.h",
    "chars": 1901,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: OverWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Parasite.h",
    "chars": 755,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Parasite\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/Phazon.h",
    "chars": 310,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Phazon\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/PhazonGun.h",
    "chars": 196,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: PhazonGun\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/PuddleSpore.h",
    "chars": 854,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: PuddleSpore\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/PuddleToad.h",
    "chars": 881,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: PuddleToad\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/Puffer.h",
    "chars": 305,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Puffer\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/ReactorDoor.h",
    "chars": 524,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: ReactorDoor\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/Ridley.h",
    "chars": 1811,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Ridley\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/Ripper.h",
    "chars": 392,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Ripper\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/RuinsWorld.h",
    "chars": 4140,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: RuinsWorld\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#d"
  },
  {
    "path": "Runtime/Audio/SFX/SFX.h",
    "chars": 1667,
    "preview": "#ifndef DNAMP1_SFX_H\n#define DNAMP1_SFX_H\n\n#include \"Atomic.h\"\n#include \"BetaBeetle.h\"\n#include \"Bird.h\"\n#include \"Blood"
  },
  {
    "path": "Runtime/Audio/SFX/SamusShip.h",
    "chars": 1059,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: SamusShip\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Scarab.h",
    "chars": 320,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Scarab\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/Seedling.h",
    "chars": 623,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Seedling\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/SheeGoth.h",
    "chars": 1729,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: SheeGoth\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/SnakeWeed.h",
    "chars": 289,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: SnakeWeed\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Sova.h",
    "chars": 610,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Sova\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define "
  },
  {
    "path": "Runtime/Audio/SFX/SpacePirate.h",
    "chars": 2236,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: SpacePirate\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#"
  },
  {
    "path": "Runtime/Audio/SFX/SpankWeed.h",
    "chars": 1252,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: SpankWeed\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#de"
  },
  {
    "path": "Runtime/Audio/SFX/Thardus.h",
    "chars": 2090,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Thardus\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/TheEnd.h",
    "chars": 604,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: TheEnd\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/Torobyte.h",
    "chars": 600,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Torobyte\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/Triclops.h",
    "chars": 673,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Triclops\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#def"
  },
  {
    "path": "Runtime/Audio/SFX/Turret.h",
    "chars": 837,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Turret\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/UI.h",
    "chars": 2996,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: UI\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define GR"
  },
  {
    "path": "Runtime/Audio/SFX/WarWasp.h",
    "chars": 2035,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: WarWasp\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/Weapons.h",
    "chars": 3861,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Weapons\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/ZZZ.h",
    "chars": 610,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: ZZZ\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define G"
  },
  {
    "path": "Runtime/Audio/SFX/Zoomer.h",
    "chars": 676,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: Zoomer\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defin"
  },
  {
    "path": "Runtime/Audio/SFX/lumigek.h",
    "chars": 288,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: lumigek\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#defi"
  },
  {
    "path": "Runtime/Audio/SFX/test.h",
    "chars": 227,
    "preview": "/* Auto-generated Amuse Defines\n *\n * Project: Audio\n * Subproject: test\n * Date: Sat Sep  1 12:32:04 2018\n */\n\n#define "
  },
  {
    "path": "Runtime/Audio/g721.c",
    "chars": 12297,
    "preview": "/* G.721 decoder, from Sun's public domain CCITT-ADPCM sources,\n * retrieved from ftp://ftp.cwi.nl/pub/audio/ccitt-adpcm"
  },
  {
    "path": "Runtime/Audio/g721.h",
    "chars": 1378,
    "preview": "#ifndef _g721_h\n#define _g721_h\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct g72x_state {\n    long yl;    /* Locked o"
  },
  {
    "path": "Runtime/AutoMapper/CAutoMapper.cpp",
    "chars": 72574,
    "preview": "#include \"Runtime/AutoMapper/CAutoMapper.hpp\"\n\n#include \"Runtime/CInGameTweakManagerBase.hpp\"\n#include \"Runtime/CSimpleP"
  },
  {
    "path": "Runtime/AutoMapper/CAutoMapper.hpp",
    "chars": 12191,
    "preview": "#pragma once\n\n#include <array>\n#include <list>\n#include <memory>\n#include <optional>\n#include <vector>\n\n#include \"Runtim"
  },
  {
    "path": "Runtime/AutoMapper/CMakeLists.txt",
    "chars": 317,
    "preview": "set(AUTOMAPPER_SOURCES\n        CMapUniverse.hpp CMapUniverse.cpp\n        CMapWorldInfo.hpp CMapWorldInfo.cpp\n        CMa"
  },
  {
    "path": "Runtime/AutoMapper/CMapArea.cpp",
    "chars": 8031,
    "preview": "#include \"Runtime/AutoMapper/CMapArea.hpp\"\n\n#include <array>\n#include <cstring>\n\n#include \"Runtime/AutoMapper/CMappableO"
  },
  {
    "path": "Runtime/AutoMapper/CMapArea.hpp",
    "chars": 2578,
    "preview": "#pragma once\n\n#include <memory>\n#include <vector>\n\n#include \"Runtime/Graphics/CCubeModel.hpp\"\n#include \"Runtime/AutoMapp"
  },
  {
    "path": "Runtime/AutoMapper/CMapUniverse.cpp",
    "chars": 5430,
    "preview": "#include \"Runtime/AutoMapper/CMapUniverse.hpp\"\n\n#include \"Runtime/CSimplePool.hpp\"\n#include \"Runtime/CGameState.hpp\"\n#in"
  },
  {
    "path": "Runtime/AutoMapper/CMapUniverse.hpp",
    "chars": 5005,
    "preview": "#pragma once\n\n#include <string>\n#include <vector>\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/IFactory.hpp\"\n#includ"
  },
  {
    "path": "Runtime/AutoMapper/CMapWorld.cpp",
    "chars": 24671,
    "preview": "#include \"Runtime/AutoMapper/CMapWorld.hpp\"\n\n#include <algorithm>\n#include <array>\n\n#include \"Runtime/CSimplePool.hpp\"\n#"
  },
  {
    "path": "Runtime/AutoMapper/CMapWorld.hpp",
    "chars": 7240,
    "preview": "#pragma once\n\n#include <vector>\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runtime/rstl."
  },
  {
    "path": "Runtime/AutoMapper/CMapWorldInfo.cpp",
    "chars": 3687,
    "preview": "#include \"Runtime/AutoMapper/CMapWorldInfo.hpp\"\n\n#include \"Runtime/CMemoryCardSys.hpp\"\n#include \"Runtime/GameGlobalObjec"
  },
  {
    "path": "Runtime/AutoMapper/CMapWorldInfo.hpp",
    "chars": 1216,
    "preview": "#pragma once\n\n#include <map>\n#include <vector>\n\n#include \"RetroTypes.hpp\"\n#include \"Runtime/Streams/IOStreams.hpp\"\n\nname"
  },
  {
    "path": "Runtime/AutoMapper/CMappableObject.cpp",
    "chars": 10807,
    "preview": "#include \"Runtime/AutoMapper/CMappableObject.hpp\"\n\n#include \"Runtime/AutoMapper/CMapWorldInfo.hpp\"\n#include \"Runtime/Aut"
  },
  {
    "path": "Runtime/AutoMapper/CMappableObject.hpp",
    "chars": 2418,
    "preview": "#pragma once\n\n#include <utility>\n\n#include \"Runtime/GameGlobalObjects.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n\n#include <"
  },
  {
    "path": "Runtime/CArchitectureMessage.hpp",
    "chars": 5011,
    "preview": "#pragma once\n\n#include <memory>\n\n#include \"Runtime/GCNTypes.hpp\"\n#include \"Runtime/rstl.hpp\"\n#include \"Runtime/Input/CFi"
  },
  {
    "path": "Runtime/CArchitectureQueue.hpp",
    "chars": 512,
    "preview": "#pragma once\n\n#include <list>\n#include \"Runtime/CArchitectureMessage.hpp\"\n\nnamespace metaforce {\n\nclass CArchitectureQue"
  },
  {
    "path": "Runtime/CBasics.hpp",
    "chars": 2103,
    "preview": "#pragma once\n\n#include <chrono>\n#include <cstdint>\n#include <cstdlib>\n#include <algorithm>\n#include <string>\n#ifndef _WI"
  },
  {
    "path": "Runtime/CBasicsPC.cpp",
    "chars": 9328,
    "preview": "#ifndef _WIN32\n#include <sys/time.h>\n#include <unistd.h>\n#if __APPLE__\n#include <mach/mach_time.h>\n#endif\n#endif\n\n#inclu"
  },
  {
    "path": "Runtime/CCRC32.cpp",
    "chars": 4062,
    "preview": "#include \"Runtime/CCRC32.hpp\"\n\n#include <array>\n\nnamespace metaforce {\nnamespace {\nconstexpr std::array<uint32_t, 256> c"
  },
  {
    "path": "Runtime/CCRC32.hpp",
    "chars": 173,
    "preview": "#pragma once\n\n#include <cstdint>\n\nnamespace metaforce {\n\nclass CCRC32 {\npublic:\n  static uint32_t Calculate(const void* "
  },
  {
    "path": "Runtime/CDependencyGroup.cpp",
    "chars": 767,
    "preview": "#include \"Runtime/CDependencyGroup.hpp\"\n#include \"Runtime/CToken.hpp\"\n\nnamespace metaforce {\nCDependencyGroup::CDependen"
  },
  {
    "path": "Runtime/CDependencyGroup.hpp",
    "chars": 549,
    "preview": "#pragma once\n\n#include <vector>\n#include \"Runtime/CFactoryMgr.hpp\"\n\nnamespace metaforce {\nclass CDependencyGroup {\n  std"
  },
  {
    "path": "Runtime/CDvdFile.cpp",
    "chars": 12442,
    "preview": "#include \"Runtime/CDvdFile.hpp\"\n\n// #include <optick.h>\n\n#include <SDL3/SDL_error.h>\n#include <SDL3/SDL_iostream.h>\n\n#in"
  },
  {
    "path": "Runtime/CDvdFile.hpp",
    "chars": 2737,
    "preview": "#pragma once\n\n#include <atomic>\n#include <array>\n#include <condition_variable>\n#include <functional>\n#include <memory>\n#"
  },
  {
    "path": "Runtime/CDvdRequest.hpp",
    "chars": 359,
    "preview": "#pragma once\n\nnamespace metaforce {\n\nclass IDvdRequest {\npublic:\n  virtual ~IDvdRequest() = default;\n\n  virtual void Wai"
  },
  {
    "path": "Runtime/CFactoryMgr.cpp",
    "chars": 3660,
    "preview": "#include \"Runtime/CFactoryMgr.hpp\"\n\n#include <algorithm>\n#include <array>\n#include <cctype>\n#include <iterator>\n//#inclu"
  },
  {
    "path": "Runtime/CFactoryMgr.hpp",
    "chars": 1626,
    "preview": "#pragma once\n\n#include <unordered_map>\n\n#include \"Runtime/IFactory.hpp\"\n#include \"Runtime/Streams/IOStreams.hpp\"\n#includ"
  },
  {
    "path": "Runtime/CGameAllocator.cpp",
    "chars": 2128,
    "preview": "#include \"Runtime/CGameAllocator.hpp\"\n#include \"Runtime/Logging.hpp\"\n\nnamespace metaforce {\n#pragma GCC diagnostic ignor"
  },
  {
    "path": "Runtime/CGameAllocator.hpp",
    "chars": 588,
    "preview": "#pragma once\n\n#include <cstddef>\n#include <memory>\n#include <vector>\n\n#include \"Runtime/RetroTypes.hpp\"\n\nnamespace metaf"
  },
  {
    "path": "Runtime/CGameDebug.hpp",
    "chars": 1068,
    "preview": "#pragma once\n\n#include <string>\n\nnamespace metaforce {\nstruct CFinalInput;\n\nconst char* StringForControlOption(int);\n\nen"
  },
  {
    "path": "Runtime/CGameHintInfo.cpp",
    "chars": 1629,
    "preview": "#include \"Runtime/CGameHintInfo.hpp\"\n\n#include \"Runtime/CMemoryCardSys.hpp\"\n#include \"Runtime/CToken.hpp\"\n#include \"Runt"
  },
  {
    "path": "Runtime/CGameHintInfo.hpp",
    "chars": 1335,
    "preview": "#pragma once\n\n#include <string_view>\n#include <vector>\n\n#include \"Runtime/IFactory.hpp\"\n#include \"Runtime/RetroTypes.hpp"
  },
  {
    "path": "Runtime/CGameOptions.cpp",
    "chars": 23921,
    "preview": "#include \"Runtime/CGameOptions.hpp\"\n\n#include <cstring>\n\n#include \"Runtime/CGameHintInfo.hpp\"\n#include \"Runtime/CGameSta"
  },
  {
    "path": "Runtime/CGameOptions.hpp",
    "chars": 7858,
    "preview": "#pragma once\n\n#include <array>\n#include <string_view>\n#include <vector>\n\n#include \"Runtime/CWorldSaveGameInfo.hpp\"\n#incl"
  },
  {
    "path": "Runtime/CGameState.cpp",
    "chars": 8902,
    "preview": "#include \"Runtime/CGameState.hpp\"\n\n#include \"Runtime/CMemoryCardSys.hpp\"\n#include \"Runtime/CWorldSaveGameInfo.hpp\"\n#incl"
  },
  {
    "path": "Runtime/CGameState.hpp",
    "chars": 6839,
    "preview": "#pragma once\n\n#include <array>\n#include <memory>\n#include <vector>\n\n#include \"Runtime/AutoMapper/CMapWorldInfo.hpp\"\n#inc"
  },
  {
    "path": "Runtime/CIOWin.hpp",
    "chars": 829,
    "preview": "#pragma once\n\n#include <functional>\n#include <memory>\n#include <string>\n\n#include \"Runtime/RetroTypes.hpp\"\n\nnamespace me"
  },
  {
    "path": "Runtime/CIOWinManager.cpp",
    "chars": 6901,
    "preview": "#include \"Runtime/CIOWinManager.hpp\"\n\n#include \"Runtime/CArchitectureMessage.hpp\"\n#include \"Runtime/CIOWin.hpp\"\n\nnamespa"
  },
  {
    "path": "Runtime/CIOWinManager.hpp",
    "chars": 1400,
    "preview": "#pragma once\n\n#include <list>\n#include <memory>\n\n#include \"Runtime/CArchitectureQueue.hpp\"\n#include \"Runtime/CIOWin.hpp\""
  },
  {
    "path": "Runtime/CInGameTweakManagerBase.hpp",
    "chars": 2282,
    "preview": "#pragma once\n\n#include <algorithm>\n#include <string>\n#include <vector>\n\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runt"
  },
  {
    "path": "Runtime/CInfiniteLoopDetector.cpp",
    "chars": 1346,
    "preview": "#include \"Runtime/CInfiniteLoopDetector.hpp\"\n#include \"Runtime/Logging.hpp\"\n\nnamespace metaforce {\nnamespace {\nstd::chro"
  },
  {
    "path": "Runtime/CInfiniteLoopDetector.hpp",
    "chars": 437,
    "preview": "#pragma once\n\n#include <chrono>\n#include <mutex>\n#include <future>\n\nnamespace metaforce {\nclass CInfiniteLoopDetector {\n"
  },
  {
    "path": "Runtime/CMFGameBase.hpp",
    "chars": 319,
    "preview": "#pragma once\n\n#include \"Runtime/CIOWin.hpp\"\n\nnamespace metaforce {\n\nclass CMFGameBase : public CIOWin {\npublic:\n  explic"
  },
  {
    "path": "Runtime/CMain.cpp",
    "chars": 21200,
    "preview": "#include \"CResourceNameDatabase.hpp\"\n\n#include <string>\n#include <string_view>\n#include <numeric>\n#include <iostream>\n#i"
  },
  {
    "path": "Runtime/CMainFlowBase.cpp",
    "chars": 646,
    "preview": "#include \"Runtime/CMainFlowBase.hpp\"\n\n#include \"Runtime/CArchitectureMessage.hpp\"\n\nnamespace metaforce {\n\nCIOWin::EMessa"
  },
  {
    "path": "Runtime/CMainFlowBase.hpp",
    "chars": 755,
    "preview": "#pragma once\n\n#include \"Runtime/CIOWin.hpp\"\n\nnamespace metaforce {\n\nenum class EClientFlowStates {\n  Unspecified = -1,\n "
  },
  {
    "path": "Runtime/CMakeLists.txt",
    "chars": 12753,
    "preview": "macro(runtime_add_list rel_path a_list)\n    unset(tmp_list)\n    foreach (path IN LISTS ${a_list})\n        if (IS_ABSOLUT"
  },
  {
    "path": "Runtime/CMayaSpline.cpp",
    "chars": 13600,
    "preview": "#include \"Runtime/CMayaSpline.hpp\"\n\n#include \"Runtime/Streams/CInputStream.hpp\"\n\nnamespace metaforce {\nvoid ValidateTang"
  },
  {
    "path": "Runtime/CMayaSpline.hpp",
    "chars": 1820,
    "preview": "#pragma once\n\n#include <vector>\n#include \"RetroTypes.hpp\"\n\n#include <zeus/CVector2f.hpp>\n#include <rstl.hpp>\n#include <c"
  },
  {
    "path": "Runtime/CMemoryCardSys.cpp",
    "chars": 20035,
    "preview": "#include \"Runtime/CMemoryCardSys.hpp\"\n\n#include \"Runtime/CCRC32.hpp\"\n#include \"Runtime/CGameState.hpp\"\n#include \"Runtime"
  },
  {
    "path": "Runtime/CMemoryCardSys.hpp",
    "chars": 7587,
    "preview": "#pragma once\n\n#include <memory>\n#include <optional>\n#include <string>\n#include <vector>\n\n#include \"Runtime/CGameHintInfo"
  },
  {
    "path": "Runtime/CMemoryCardSysNix.cpp",
    "chars": 2921,
    "preview": "#include \"CMemoryCardSys.hpp\"\n\n#include \"Runtime/GameGlobalObjects.hpp\"\n#include \"Runtime/IMain.hpp\"\n#include \"Runtime/C"
  },
  {
    "path": "Runtime/CMemoryCardSysOSX.cpp",
    "chars": 1795,
    "preview": "#include \"CMemoryCardSys.hpp\"\n#include \"Runtime/GameGlobalObjects.hpp\"\n#include \"Runtime/IMain.hpp\"\nnamespace metaforce "
  },
  {
    "path": "Runtime/CMemoryCardSysWin.cpp",
    "chars": 5053,
    "preview": "#include \"Runtime/CMemoryCardSys.hpp\"\n\n#include \"Runtime/GameGlobalObjects.hpp\"\n#include \"Runtime/IMain.hpp\"\n#include \"R"
  },
  {
    "path": "Runtime/CObjectList.cpp",
    "chars": 3104,
    "preview": "#include \"Runtime/CObjectList.hpp\"\n#ifndef NDEBUG\n#include \"Runtime/Logging.hpp\"\n#include \"Runtime/Formatting.hpp\"\n#endi"
  },
  {
    "path": "Runtime/CObjectList.hpp",
    "chars": 2949,
    "preview": "#pragma once\n\n#include <array>\n\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runtime/World/CEntity.hpp\"\n\nnamespace metafo"
  },
  {
    "path": "Runtime/CPakFile.cpp",
    "chars": 5964,
    "preview": "#include \"Runtime/CPakFile.hpp\"\n\n#include \"Runtime/Logging.hpp\"\n\nnamespace metaforce {\nCPakFile::CPakFile(std::string_vi"
  },
  {
    "path": "Runtime/CPakFile.hpp",
    "chars": 2646,
    "preview": "#pragma once\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"Runtime/CDvdFile.hpp\"\n#include \"Runtime/C"
  },
  {
    "path": "Runtime/CPlayerState.cpp",
    "chars": 17727,
    "preview": "#include \"Runtime/CPlayerState.hpp\"\n\n#include <algorithm>\n#include <array>\n#include <cstring>\n\n#include \"Runtime/CString"
  },
  {
    "path": "Runtime/CPlayerState.hpp",
    "chars": 5614,
    "preview": "#pragma once\n\n#include <string_view>\n#include <vector>\n\n#include \"Runtime/CStaticInterference.hpp\"\n#include \"Runtime/Str"
  },
  {
    "path": "Runtime/CRandom16.cpp",
    "chars": 606,
    "preview": "#include \"Runtime/CRandom16.hpp\"\n\nnamespace metaforce {\n\nCRandom16* CRandom16::g_randomNumber = nullptr;                "
  },
  {
    "path": "Runtime/CRandom16.hpp",
    "chars": 1470,
    "preview": "#pragma once\n\n#include \"Runtime/GCNTypes.hpp\"\n\nnamespace metaforce {\n\nclass CRandom16 {\n  s32 m_seed;\n  static CRandom16"
  },
  {
    "path": "Runtime/CResFactory.cpp",
    "chars": 4463,
    "preview": "#include \"Runtime/CResFactory.hpp\"\n\n#include \"CResourceNameDatabase.hpp\"\n#include \"Runtime/CSimplePool.hpp\"\n#include \"Ru"
  },
  {
    "path": "Runtime/CResFactory.hpp",
    "chars": 3878,
    "preview": "#pragma once\n\n#include <list>\n#include <memory>\n#include <unordered_map>\n#include <vector>\n\n#include \"Runtime/CResLoader"
  },
  {
    "path": "Runtime/CResLoader.cpp",
    "chars": 10478,
    "preview": "#include \"Runtime/CResLoader.hpp\"\n\n#include \"Runtime/CPakFile.hpp\"\n#include \"Runtime/Logging.hpp\"\n#include \"Runtime/Form"
  },
  {
    "path": "Runtime/CResLoader.hpp",
    "chars": 3304,
    "preview": "#pragma once\n\n#include <functional>\n#include <list>\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"Run"
  },
  {
    "path": "Runtime/CResourceNameDatabase.cpp",
    "chars": 1168,
    "preview": "#include \"Runtime/CResourceNameDatabase.hpp\"\n\n#include \"Runtime/CBasics.hpp\"\n#include \"Runtime/ConsoleVariables/FileStor"
  },
  {
    "path": "Runtime/CResourceNameDatabase.hpp",
    "chars": 669,
    "preview": "#pragma once\n#include \"RetroTypes.hpp\"\n\n#include <unordered_map>\n\nnamespace metaforce {\nclass FileStoreManager;\nclass CR"
  },
  {
    "path": "Runtime/CScannableObjectInfo.cpp",
    "chars": 2239,
    "preview": "#include \"Runtime/CScannableObjectInfo.hpp\"\n\n#include \"Runtime/GameGlobalObjects.hpp\"\n\nnamespace metaforce {\nCScannableO"
  },
  {
    "path": "Runtime/CScannableObjectInfo.hpp",
    "chars": 1435,
    "preview": "#pragma once\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/IFactory.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n#include \""
  },
  {
    "path": "Runtime/CScriptMailbox.cpp",
    "chars": 2444,
    "preview": "#include \"Runtime/CScriptMailbox.hpp\"\n\n#include \"Runtime/CWorldSaveGameInfo.hpp\"\n#include \"Runtime/CStateManager.hpp\"\n#i"
  },
  {
    "path": "Runtime/CScriptMailbox.hpp",
    "chars": 1093,
    "preview": "#pragma once\n\n#include <vector>\n\n#include \"Runtime/Streams/IOStreams.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Ru"
  },
  {
    "path": "Runtime/CSimplePool.cpp",
    "chars": 1997,
    "preview": "#include \"Runtime/CSimplePool.hpp\"\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/IVParamObj.hpp\"\n\n#include <cassert>\n"
  },
  {
    "path": "Runtime/CSimplePool.hpp",
    "chars": 1116,
    "preview": "#pragma once\n\n#include <unordered_map>\n#include <vector>\n\n#include \"Runtime/IObjectStore.hpp\"\n#include \"Runtime/IVParamO"
  },
  {
    "path": "Runtime/CSortedLists.cpp",
    "chars": 12097,
    "preview": "#include \"Runtime/CSortedLists.hpp\"\n\n#include \"Runtime/World/CActor.hpp\"\n\n#include <algorithm>\n#include <cassert>\n\nnames"
  },
  {
    "path": "Runtime/CSortedLists.hpp",
    "chars": 2134,
    "preview": "#pragma once\n\n#include <array>\n\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runtime/Collision/CMaterialFilter.hpp\"\n\n#inc"
  },
  {
    "path": "Runtime/CStateManager.cpp",
    "chars": 101629,
    "preview": "#include \"Runtime/CStateManager.hpp\"\n\n#include <cmath>\n\n#include \"Runtime/AutoMapper/CMapWorldInfo.hpp\"\n#include \"Runtim"
  },
  {
    "path": "Runtime/CStateManager.hpp",
    "chars": 21930,
    "preview": "#pragma once\n\n#include <list>\n#include <map>\n#include <memory>\n#include <optional>\n#include <set>\n#include <string>\n#inc"
  },
  {
    "path": "Runtime/CStaticInterference.cpp",
    "chars": 1862,
    "preview": "#include \"Runtime/CStaticInterference.hpp\"\n\n#include <zeus/Math.hpp>\n\nnamespace metaforce {\n\nCStaticInterference::CStati"
  },
  {
    "path": "Runtime/CStaticInterference.hpp",
    "chars": 562,
    "preview": "#pragma once\n\n#include <vector>\n#include \"Runtime/RetroTypes.hpp\"\n\nnamespace metaforce {\nclass CStateManager;\n\nstruct CS"
  },
  {
    "path": "Runtime/CStopwatch.cpp",
    "chars": 871,
    "preview": "#include \"Runtime/CStopwatch.hpp\"\n\nnamespace metaforce {\nCStopwatch CStopwatch::mGlobalTimer = {};\n\nfloat CStopwatch::Ge"
  },
  {
    "path": "Runtime/CStopwatch.hpp",
    "chars": 739,
    "preview": "#pragma once\n\n#include \"Runtime/GCNTypes.hpp\"\n\n#include <cmath>\n#include <chrono>\n\nnamespace metaforce {\nclass CStopwatc"
  },
  {
    "path": "Runtime/CStringExtras.cpp",
    "chars": 4577,
    "preview": "#include \"Runtime/CStringExtras.hpp\"\n#include \"Runtime/Streams/CInputStream.hpp\"\n\n#include <cstdint>\n\nnamespace {\n\nconst"
  },
  {
    "path": "Runtime/CStringExtras.hpp",
    "chars": 3767,
    "preview": "#pragma once\n\n#include <algorithm>\n#include <cctype>\n#include <string>\n#include <sstream>\n#include <vector>\n\nnamespace m"
  },
  {
    "path": "Runtime/CTextureCache.cpp",
    "chars": 926,
    "preview": "#include \"Runtime/CTextureCache.hpp\"\n#include \"Runtime/CToken.hpp\"\n\nnamespace metaforce {\nCTextureCache::CTextureCache(C"
  },
  {
    "path": "Runtime/CTextureCache.hpp",
    "chars": 1245,
    "preview": "#pragma once\n\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runtime/Graphics/CTexture.hpp\"\n\n#include <map>\n\nnamespace meta"
  },
  {
    "path": "Runtime/CTimeProvider.cpp",
    "chars": 688,
    "preview": "#include \"Runtime/CTimeProvider.hpp\"\n\n#include \"Runtime/Graphics/CGraphics.hpp\"\n\nnamespace metaforce {\nstatic CTimeProvi"
  },
  {
    "path": "Runtime/CTimeProvider.hpp",
    "chars": 323,
    "preview": "#pragma once\nnamespace metaforce {\nclass CTimeProvider {\npublic:\n  const float& x0_currentTime; // in seconds\n  bool x4_"
  },
  {
    "path": "Runtime/CToken.cpp",
    "chars": 3844,
    "preview": "#include \"Runtime/CToken.hpp\"\n\nnamespace metaforce {\nu16 CObjectReference::RemoveReference() {\n  --x0_refCount;\n  if (x0"
  },
  {
    "path": "Runtime/CToken.hpp",
    "chars": 5966,
    "preview": "#pragma once\n\n#include <memory>\n\n#include \"Runtime/IFactory.hpp\"\n#include \"Runtime/IObj.hpp\"\n#include \"Runtime/IObjectSt"
  },
  {
    "path": "Runtime/CWorldSaveGameInfo.cpp",
    "chars": 2799,
    "preview": "#include \"Runtime/CWorldSaveGameInfo.hpp\"\n\n#include \"Runtime/CToken.hpp\"\n\nnamespace metaforce {\nCWorldSaveGameInfo::CWor"
  },
  {
    "path": "Runtime/CWorldSaveGameInfo.hpp",
    "chars": 1412,
    "preview": "#pragma once\n\n#include <vector>\n\n#include \"Runtime/CFactoryMgr.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n\nnamespace metafor"
  },
  {
    "path": "Runtime/Camera/CBallCamera.cpp",
    "chars": 94519,
    "preview": "#include \"Runtime/Camera/CBallCamera.hpp\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"Runtime/CStateManager.hpp\"\n#"
  },
  {
    "path": "Runtime/Camera/CBallCamera.hpp",
    "chars": 12417,
    "preview": "#pragma once\n\n#include <cmath>\n#include <memory>\n#include <vector>\n\n#include \"Runtime/Camera/CCameraSpline.hpp\"\n#include"
  },
  {
    "path": "Runtime/Camera/CCameraFilter.cpp",
    "chars": 12853,
    "preview": "#include \"Runtime/Camera/CCameraFilter.hpp\"\n\n#include \"Runtime/CDvdFile.hpp\"\n#include \"Runtime/CSimplePool.hpp\"\n#include"
  },
  {
    "path": "Runtime/Camera/CCameraFilter.hpp",
    "chars": 2656,
    "preview": "#pragma once\n\n#include \"Runtime/CToken.hpp\"\n#include \"Runtime/Graphics/CTexture.hpp\"\n#include \"Runtime/RetroTypes.hpp\"\n\n"
  },
  {
    "path": "Runtime/Camera/CCameraManager.cpp",
    "chars": 27920,
    "preview": "#include \"Runtime/Camera/CCameraManager.hpp\"\n\n#include <algorithm>\n\n#include \"Runtime/CStateManager.hpp\"\n#include \"Runti"
  },
  {
    "path": "Runtime/Camera/CCameraManager.hpp",
    "chars": 5753,
    "preview": "#pragma once\n\n#include <list>\n#include <vector>\n\n#include \"Runtime/RetroTypes.hpp\"\n#include \"Runtime/rstl.hpp\"\n#include "
  }
]

// ... and 1118 more files (download for full content)

About this extraction

This page contains the full source code of the AxioDL/urde GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1318 files (8.5 MB), approximately 2.3M tokens, and a symbol index with 9884 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!