Boss/BossKnuckle: Implement BossKnuckleHandPrint (#985)

This commit is contained in:
guymakinggames 2026-03-30 16:49:09 +01:00 committed by GitHub
parent 1778223e55
commit e95a370468
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 79 additions and 9 deletions

View file

@ -6081,40 +6081,40 @@ Boss/BossKnuckle/BossKnuckleHandPrint.o:
- offset: 0x02d440
size: 124
label: _ZN20BossKnuckleHandPrintC2EPKc
status: NotDecompiled
status: Matching
- offset: 0x02d4bc
size: 136
label: _ZN20BossKnuckleHandPrintC1EPKc
status: NotDecompiled
status: Matching
- offset: 0x02d544
size: 100
label: _ZN20BossKnuckleHandPrint19initWithArchiveNameERKN2al13ActorInitInfoEPKc
status: NotDecompiled
status: Matching
- offset: 0x02d5a8
size: 52
label: _ZN20BossKnuckleHandPrint6appearEv
status: NotDecompiled
status: Matching
- offset: 0x02d5dc
size: 68
label: _ZN20BossKnuckleHandPrint23startDisappearIfAppeardEv
status: NotDecompiled
status: Matching
- offset: 0x02d620
size: 112
label: _ZN20BossKnuckleHandPrint9exeAppearEv
status: NotDecompiled
status: Matching
- offset: 0x02d690
size: 96
label: _ZN20BossKnuckleHandPrint12exeDisappearEv
status: NotDecompiled
status: Matching
- offset: 0x02d6f0
size: 116
label: _ZNK12_GLOBAL__N_129BossKnuckleHandPrintNrvAppear7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
- offset: 0x02d764
size: 100
label: _ZNK12_GLOBAL__N_132BossKnuckleHandPrintNrvDisappear7executeEPN2al11NerveKeeperE
status: NotDecompiled
status: Matching
guess: true
Boss/BossKnuckle/BossKnuckleMummyGenerator.o:
'.text':

View file

@ -0,0 +1,52 @@
#include "Boss/BossKnuckle/BossKnuckleHandPrint.h"
#include "Library/LiveActor/ActorAnimFunction.h"
#include "Library/LiveActor/ActorClippingFunction.h"
#include "Library/LiveActor/ActorInitUtil.h"
#include "Library/Nerve/NerveSetupUtil.h"
#include "Library/Nerve/NerveUtil.h"
namespace {
NERVE_IMPL(BossKnuckleHandPrint, Appear);
NERVE_IMPL(BossKnuckleHandPrint, Disappear);
NERVES_MAKE_NOSTRUCT(BossKnuckleHandPrint, Appear, Disappear);
} // namespace
BossKnuckleHandPrint::BossKnuckleHandPrint(const char* name) : al::LiveActor(name) {}
void BossKnuckleHandPrint::initWithArchiveName(const al::ActorInitInfo& initInfo,
const char* archiveName) {
al::initActorWithArchiveName(this, initInfo, archiveName, nullptr);
al::initNerve(this, &Appear, 0);
makeActorDead();
}
void BossKnuckleHandPrint::appear() {
al::LiveActor::appear();
al::setNerve(this, &Appear);
al::invalidateClipping(this);
}
void BossKnuckleHandPrint::startDisappearIfAppeard() {
if (al::isNerve(this, &Appear))
al::setNerve(this, &Disappear);
}
void BossKnuckleHandPrint::exeAppear() {
if (al::isFirstStep(this)) {
al::startMclAnim(this, "Appear");
if (al::isMtsAnimExist(this, "LeftRightChange")) {
u8 frame = mIsLeft ? 0 : 1;
al::startMtsAnimAndSetFrameAndStop(this, "LeftRightChange", frame);
}
}
}
void BossKnuckleHandPrint::exeDisappear() {
if (al::isFirstStep(this))
al::startMclAnim(this, "Disappear");
if (al::isMclAnimEnd(this)) {
al::validateClipping(this);
kill();
}
}

View file

@ -0,0 +1,18 @@
#pragma once
#include "Library/LiveActor/LiveActor.h"
class BossKnuckleHandPrint : public al::LiveActor {
public:
BossKnuckleHandPrint(const char* name);
void initWithArchiveName(const al::ActorInitInfo& initInfo, const char* archiveName);
void appear() override;
void startDisappearIfAppeard();
void exeAppear();
void exeDisappear();
private:
bool mIsLeft = false;
};
static_assert(sizeof(BossKnuckleHandPrint) == 0x110);