mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-07 13:43:51 +00:00
Replace the 2,200-line monolithic AnimationController (goto-driven, single class, untestable) with a composed FSM architecture per refactor.md. New subsystem (src/rendering/animation/ — 16 headers, 10 sources): - CharacterAnimator: FSM composer implementing ICharacterAnimator - LocomotionFSM: idle/walk/run/sprint/jump/swim/strafe - CombatFSM: melee/ranged/spell cast/stun/hit reaction/charge - ActivityFSM: emote/loot/sit-down/sitting/sit-up - MountFSM: idle/run/flight/taxi/fidget/rear-up (per-instance RNG) - AnimCapabilitySet + AnimCapabilityProbe: probe once at model load, eliminate per-frame hasAnimation() linear search - AnimationManager: registry of CharacterAnimator by GUID - EmoteRegistry: DBC-backed emote command → animId singleton - FootstepDriver, SfxStateDriver: extracted from AnimationController animation_ids.hpp/.cpp moved to animation/ subdirectory (452 named constants); all include paths updated. AnimationController retained as thin adapter (~400 LOC): collects FrameInput, delegates to CharacterAnimator, applies AnimOutput. Priority order: Mount > Stun > HitReaction > Spell > Charge > Melee/Ranged > CombatIdle > Emote > Loot > Sit > Locomotion. STAY_IN_STATE policy when all FSMs return valid=false. Bugs fixed: - Remove static mt19937 in mount fidget (shared state across all mounted units) — replaced with per-instance seeded RNG - Remove goto from mounted animation branch (skipped init) - Remove per-frame hasAnimation() calls (now one probe at load) - Fix VK_INDEX_TYPE_UINT16 → UINT32 in shadow pass Tests (4 new suites, all ASAN+UBSan clean): - test_locomotion_fsm: 167 assertions - test_combat_fsm: 125 cases - test_activity_fsm: 112 cases - test_anim_capability: 56 cases docs/ANIMATION_SYSTEM.md added (architecture reference). |
||
|---|---|---|
| .. | ||
| animation | ||
| amd_fsr3_runtime.hpp | ||
| animation_controller.hpp | ||
| camera.hpp | ||
| camera_controller.hpp | ||
| celestial.hpp | ||
| character_preview.hpp | ||
| character_renderer.hpp | ||
| charge_effect.hpp | ||
| clouds.hpp | ||
| frustum.hpp | ||
| lens_flare.hpp | ||
| levelup_effect.hpp | ||
| lighting_manager.hpp | ||
| lightning.hpp | ||
| loading_screen.hpp | ||
| m2_model_classifier.hpp | ||
| m2_renderer.hpp | ||
| material.hpp | ||
| minimap.hpp | ||
| mount_dust.hpp | ||
| performance_hud.hpp | ||
| post_process_pipeline.hpp | ||
| quest_marker_renderer.hpp | ||
| render_graph.hpp | ||
| renderer.hpp | ||
| sky_system.hpp | ||
| skybox.hpp | ||
| spell_visual_system.hpp | ||
| starfield.hpp | ||
| swim_effects.hpp | ||
| terrain_manager.hpp | ||
| terrain_renderer.hpp | ||
| vk_buffer.hpp | ||
| vk_context.hpp | ||
| vk_frame_data.hpp | ||
| vk_pipeline.hpp | ||
| vk_render_target.hpp | ||
| vk_shader.hpp | ||
| vk_texture.hpp | ||
| vk_utils.hpp | ||
| water_renderer.hpp | ||
| weather.hpp | ||
| wmo_renderer.hpp | ||
| world_map.hpp | ||