mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
feat(animation): 452 named constants, 30-phase character animation state machine
Add animation_ids.hpp/cpp with all 452 WoW animation ID constants (anim::STAND, anim::RUN, anim::FIRE_BOW, ... anim::FLY_BACKWARDS, etc.), nameFromId() O(1) lookup, and flyVariant() compact 218-element ground→FLY_* resolver. Expand AnimationController into a full state machine with 20+ named states: spell cast (directed→omni→cast fallback chain, instant one-shot release), hit reactions (WOUND/CRIT/DODGE/BLOCK/SHIELD_BLOCK), stun, wounded idle, stealth animation substitution, loot, fishing channel, sit/sleep/kneel down→loop→up transitions, sheathe/unsheathe combat enter/exit, ranged weapons (BOW/GUN/CROSSBOW/THROWN with reload states), game object OPEN/CLOSE/DESTROY, vehicle enter/exit, mount flight directionals (FLY_LEFT/RIGHT/UP/DOWN/BACKWARDS), emote state variants, off-hand/pierce/dual-wield alternation, NPC birth/spawn/drown/rise, sprint aura override, totem idle, NPC greeting/farewell. Add spell_defines.hpp with SpellEffect (~45 constants) and SpellMissInfo (12 constants) namespaces; replace all magic numbers in spell_handler.cpp. Add GAMEOBJECT_BYTES_1 to update field table (all 4 expansion JSONs) and wire GameObjectStateCallback. Add DBC cross-validation on world entry. Expand tools/_ANIM_NAMES from ~35 to 452 entries in m2_viewer.py and asset_pipeline_gui.py. Add tests/test_animation_ids.cpp. Bug fixes included: - Stand state 1 was animating READY_2H(27) — fixed to SITTING(97) - Spell casts ended freeze-frame — add one-shot release animation - NPC 2H swing probe chain missing ATTACK_2H_LOOSE (polearm/staff) - Chair sits (states 2/4/5/6) incorrectly played floor-sit transition - STOP(3) used for all spell casts — replaced with model-aware chain
This commit is contained in:
parent
d54e262048
commit
e58f9b4b40
59 changed files with 3903 additions and 483 deletions
|
|
@ -53,6 +53,7 @@ class AmdFsr3Runtime;
|
|||
class SpellVisualSystem;
|
||||
class PostProcessPipeline;
|
||||
class AnimationController;
|
||||
enum class RangedWeaponType : uint8_t;
|
||||
class LevelUpEffect;
|
||||
class ChargeEffect;
|
||||
class SwimEffects;
|
||||
|
|
@ -176,7 +177,13 @@ public:
|
|||
void resetCombatVisualState();
|
||||
bool isMoving() const;
|
||||
void triggerMeleeSwing();
|
||||
void setEquippedWeaponType(uint32_t inventoryType);
|
||||
void setEquippedWeaponType(uint32_t inventoryType, bool is2HLoose = false,
|
||||
bool isFist = false, bool isDagger = false,
|
||||
bool hasOffHand = false, bool hasShield = false);
|
||||
void triggerSpecialAttack(uint32_t spellId);
|
||||
void setEquippedRangedType(RangedWeaponType type);
|
||||
void triggerRangedShot();
|
||||
RangedWeaponType getEquippedRangedType() const;
|
||||
void setCharging(bool charging);
|
||||
bool isCharging() const;
|
||||
void startChargeEffect(const glm::vec3& position, const glm::vec3& direction);
|
||||
|
|
@ -386,7 +393,7 @@ private:
|
|||
VkBuffer reflPerFrameUBO = VK_NULL_HANDLE;
|
||||
VmaAllocation reflPerFrameUBOAlloc = VK_NULL_HANDLE;
|
||||
void* reflPerFrameUBOMapped = nullptr;
|
||||
VkDescriptorSet reflPerFrameDescSet = VK_NULL_HANDLE;
|
||||
VkDescriptorSet reflPerFrameDescSet[MAX_FRAMES] = {};
|
||||
|
||||
bool createPerFrameResources();
|
||||
void destroyPerFrameResources();
|
||||
|
|
@ -434,7 +441,7 @@ private:
|
|||
|
||||
bool ghostMode_ = false; // set each frame from gameHandler->isPlayerGhost()
|
||||
|
||||
// Phase 2.5: Render Graph — declarative pass ordering with automatic barriers
|
||||
// Render Graph — declarative pass ordering with automatic barriers
|
||||
std::unique_ptr<RenderGraph> renderGraph_;
|
||||
void buildFrameGraph(game::GameHandler* gameHandler);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue