
#ifndef COMMON_PERSO_H_INCLUDED
#define COMMON_PERSO_H_INCLUDED

// --- positionnement des équipements ---

// emplacement dedié / correspond à s_attache de perso
// tete    main-gauche main-droite
// casque  bouclier    arme
#define MAX_ATTACHE     3
#define MAX_CEINTURE    3
enum {
    EMP_NULL = -1,
    // s_attache[0] ...
    EMP_TETE, EMP_BRAS_G, EMP_MAIN_D,
    //
    EMP_CEINTURE, EMP_SAC,
    //EMP_TORSE, EMP_COU, EMP_PIEDS, EMP_POIGNET_G, EMP_POIGNET_D, EMP_DOIGTS,
};

struct s_equi_decalage
{
    std::string code;
    int         ref_joint;
    OVec3_f     pos_decal;
    OVec3_f     rot_decal;
};
/*
tete>casque / bras_gauche>bouclier / main_droite>arme

obj >>> angle 0 à l'est
!!! attention : repere interne y verticale
utilisez blender (par ex) pour récupérer le nom du bone +
voir le fichier bin/bones pour la correspondance des bones<>joints (OMesh_gltf::P_setInfoBones())

const s_equi_decalage gl_equi_decalage[] = {
    {"null", 0, {0, 0, 0}, {0, 0, 0} },
    {"null", 0, {0, 0, 0}, {0, 0, 0} },
    {"null", 0, {0, 0, 0}, {0, 0, 0} },

    {"barbarian", 14, {0, 0.55, 0}, {-90, -90, 0} },
    {"barbarian", 38, {0, 0, 0.2}, {90, -90, 0} },      // on recupere sur l'avant-bras
    {"barbarian", 12, {0, 0.1, 0}, {-90, 0, 90} },      // hand.r
    //{"barbarian", 13, {0, 0, 0}, {-90, 0, 45} },      // handslot.r

    {"skeleton_warrior", 14, {0, 0.55, 0}, {-90, -90, 0} },
    {"skeleton_warrior", 38, {0, 0.1, 0.1}, {90, -90, 0} },
    {"skeleton_warrior", 13, {0, 0, 0}, {-90, 0, 45} },
};
*/

// gltf angle 0 face au sud (vue principale)
const s_equi_decalage gl_equi_decalage[] = {
    {"null", 0, {0, 0, 0}, {0, 0, 0} },
    {"null", 0, {0, 0, 0}, {0, 0, 0} },
    {"null", 0, {0, 0, 0}, {0, 0, 0} },

    {"barbarian", 14, {0, 0.55, 0}, {0, 0, 0} },
    {"barbarian", 38, {0, 0, 0.2}, {0, 0, 0} },      // on recupere sur l'avant-bras
    {"barbarian", 12, {0, 0.1, 0}, {0, 0, 45} },      // hand.r
    //{"barbarian", 13, {0, 0, 0}, {0, 0, 0} },       // handslot.r

    {"skeleton_warrior", 14, {0, 0.55, 0}, {0, 0, 0} },
    {"skeleton_warrior", 38, {0, 0.1, 0.1}, {0, 0, 0} },
    {"skeleton_warrior", 12, {0, 0, 0}, {0, 0, 90} },     // hand.r
    //{"skeleton_warrior", 13, {0, 0, 0}, {0, 0, 45} },    // handslot.r
};

// etats > normal / gelé / étourdi / (feu (empoisonné
enum {PER_STATE_NULL,
    PER_STATE_FREEZE_UP, PER_STATE_FREEZE, PER_STATE_FREEZE_DOWN,
    PER_STATE_KO,
    PER_STATE_FIRE
};

#endif // COMMON_PERSO_H_INCLUDED
