mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(component): add CCharacterComponent::ComponentOpenFingers
This commit is contained in:
parent
0c77e82e14
commit
ccaf2af8cb
@ -244,6 +244,23 @@ void CCharacterComponent::ComponentCloseFingers(CM2Model* model, COMP_HAND_SLOT
|
||||
}
|
||||
}
|
||||
|
||||
void CCharacterComponent::ComponentOpenFingers(CM2Model* model, COMP_HAND_SLOT handSlot) {
|
||||
uint32_t firstBone;
|
||||
uint32_t lastBone;
|
||||
|
||||
if (handSlot == HAND_LEFT) {
|
||||
firstBone = 13;
|
||||
lastBone = 17;
|
||||
} else {
|
||||
firstBone = 8;
|
||||
lastBone = 12;
|
||||
}
|
||||
|
||||
for (uint32_t boneId = firstBone; boneId <= lastBone; boneId++) {
|
||||
model->UnsetBoneSequence(boneId, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
HTEXTURE CCharacterComponent::CreateTexture(const char* fileName, CStatus* status) {
|
||||
auto texFlags = CGxTexFlags(GxTex_LinearMipNearest, 0, 0, 0, 0, 0, 1);
|
||||
return TextureCreate(fileName, texFlags, status, 0);
|
||||
|
||||
@ -51,6 +51,7 @@ class CCharacterComponent {
|
||||
static void AddLink(CM2Model* parent, GEOCOMPONENTLINKS link, char const* modelPath, char const* texturePath, int32_t visualID, const ItemDisplayInfoRec* displayRec);
|
||||
static CCharacterComponent* AllocComponent();
|
||||
static void ComponentCloseFingers(CM2Model* model, COMP_HAND_SLOT handSlot);
|
||||
static void ComponentOpenFingers(CM2Model* model, COMP_HAND_SLOT handSlot);
|
||||
static HTEXTURE CreateTexture(const char* fileName, CStatus* status);
|
||||
static GEOCOMPONENTLINKS GetSheatheLink(SHEATHE_TYPE sheatheType, bool a2);
|
||||
static void Initialize();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user