Decompile 2 functions in Source/Contents/Actors/GameActor.h, Source/Contents/Actors/Pc.h, ...
Batch #9043 by youko: 0 byte-identical, 2 confirmed by peer review. - fn_22586 CGrannyPc::OnProcess: logic confirmed by peer review - fn_22587 CPc::OnProcess: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
226599b855
commit
4deff9e985
6 changed files with 140 additions and 38 deletions
|
|
@ -172,7 +172,7 @@ public:
|
|||
) = 0;
|
||||
virtual void Slot12(SpriteQuad* quad, const int* box, float shiftX, int first, int second) = 0;
|
||||
virtual std::uint32_t Slot13();
|
||||
virtual void Slot14() = 0;
|
||||
virtual bool Slot14() = 0;
|
||||
virtual void Slot15(int first, int second);
|
||||
virtual void Slot16() = 0;
|
||||
virtual void Slot17();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ public:
|
|||
) override;
|
||||
void Render(int argument) override;
|
||||
|
||||
bool Slot14() override;
|
||||
void Slot15(int first, int second) override;
|
||||
void Slot19(
|
||||
int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh
|
||||
|
|
@ -220,7 +221,6 @@ public:
|
|||
const std::uint32_t* palette, const SpriteRleImage* image, int blend, short hover
|
||||
) override;
|
||||
void Slot12(SpriteQuad* quad, const int* box, float shiftX, int first, int second) override;
|
||||
void Slot14() override;
|
||||
void Slot36() override;
|
||||
|
||||
bool IsSpecialState(int state) const;
|
||||
|
|
@ -276,6 +276,7 @@ public:
|
|||
void Render(int argument) override;
|
||||
void SetAction(unsigned animation, int motion, int repeat) override;
|
||||
void Slot08() override;
|
||||
bool Slot14() override;
|
||||
void Slot15(int first, int second) override;
|
||||
void Slot19(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) override;
|
||||
void Slot20(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) override;
|
||||
|
|
|
|||
|
|
@ -2093,12 +2093,8 @@ bool CGrannyPc::OnProcess() {
|
|||
this->ModifyArgb(8, 8, 8, 8);
|
||||
}
|
||||
|
||||
union {
|
||||
void (CGameActor::*asVoid)();
|
||||
bool (CGameActor::*asBool)();
|
||||
} slot14;
|
||||
slot14.asVoid = &CGameActor::Slot14;
|
||||
const bool result = (this->*slot14.asBool)();
|
||||
bool (CGameActor::*slot14)() = &CGameActor::Slot14;
|
||||
const bool result = (this->*slot14)();
|
||||
|
||||
this->PlayFrameSounds();
|
||||
|
||||
|
|
@ -2169,12 +2165,7 @@ bool CPc::OnProcess() {
|
|||
this->ModifyArgb(8, 8, 8, 8);
|
||||
}
|
||||
|
||||
union {
|
||||
void (CGameActor::*asVoid)();
|
||||
bool (CGameActor::*asBool)();
|
||||
} slot14;
|
||||
slot14.asVoid = &CGameActor::Slot14;
|
||||
const bool result = (this->*slot14.asBool)();
|
||||
const bool result = this->Slot14();
|
||||
|
||||
this->PlayFrameSounds();
|
||||
|
||||
|
|
@ -2806,12 +2797,7 @@ bool CPlayer::OnProcess() {
|
|||
|
||||
this->UpdatePendingAction();
|
||||
|
||||
union {
|
||||
void (CGameActor::*asVoid)();
|
||||
bool (CGameActor::*asBool)();
|
||||
} slot14;
|
||||
slot14.asVoid = &CGameActor::Slot14;
|
||||
const bool result = (this->*slot14.asBool)();
|
||||
const bool result = this->Slot14();
|
||||
|
||||
this->PlayFrameSounds();
|
||||
|
||||
|
|
@ -5150,3 +5136,132 @@ void CGrannyPc::SendMsg(
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DAC080
|
||||
bool CGrannyPc::Slot14() {
|
||||
if (this->unknown_0278 != 0 && timeGetTime() > static_cast<std::uint32_t>(this->unknown_0278)) {
|
||||
this->render.isMotionFreezed = false;
|
||||
this->unknown_0278 = 0;
|
||||
}
|
||||
|
||||
if (!this->UpdateFadeOut()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
g_modeMgr.GetGameMode();
|
||||
switch (this->render.unknown_0070) {
|
||||
case 2:
|
||||
this->Slot08();
|
||||
this->GetElapsedFrames();
|
||||
if (this->render.isMotionFinished) {
|
||||
this->Slot15(0, 1);
|
||||
}
|
||||
return true;
|
||||
case 3:
|
||||
this->render.unknown_00C8 = 0;
|
||||
this->render.unknown_00D8 = 0;
|
||||
this->render.unknown_00DC = 0;
|
||||
this->render.isMotionFreezed = false;
|
||||
case 6:
|
||||
this->Slot08();
|
||||
return true;
|
||||
case 7:
|
||||
this->Slot08();
|
||||
if (this->render.isMotionFinished) {
|
||||
this->Slot15(0, 1);
|
||||
}
|
||||
return true;
|
||||
case 8: {
|
||||
this->Slot08();
|
||||
const int frames = static_cast<int>(this->GetElapsedFrames());
|
||||
if (this->hitTargetAid != 0 && frames % 34 == 0) {
|
||||
CRenderObject* target = static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->hitTargetAid);
|
||||
if (target) {
|
||||
this->Face(target->render.position.x, target->render.position.z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return CGameActor::OnProcess();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DAC200
|
||||
bool CPc::Slot14() {
|
||||
if (this->unknown_0278 != 0 && timeGetTime() > static_cast<std::uint32_t>(this->unknown_0278)) {
|
||||
this->render.isMotionFreezed = false;
|
||||
this->unknown_0278 = 0;
|
||||
}
|
||||
|
||||
if (!this->UpdateFadeOut()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
g_modeMgr.GetGameMode();
|
||||
switch (this->render.unknown_0070) {
|
||||
case 2:
|
||||
this->Slot08();
|
||||
this->GetElapsedFrames();
|
||||
if (this->render.isMotionFinished) {
|
||||
this->Slot15(0, 1);
|
||||
}
|
||||
return true;
|
||||
case 3:
|
||||
this->render.unknown_00C8 = 0;
|
||||
this->render.unknown_00D8 = 0;
|
||||
this->render.unknown_00DC = 0;
|
||||
this->render.isMotionFreezed = false;
|
||||
case 6:
|
||||
case 60:
|
||||
case 61:
|
||||
case 66:
|
||||
case 81:
|
||||
this->Slot08();
|
||||
return true;
|
||||
case 7:
|
||||
case 45:
|
||||
case 62:
|
||||
case 63:
|
||||
case 64:
|
||||
case 65:
|
||||
case 67:
|
||||
case 68:
|
||||
case 69:
|
||||
case 70:
|
||||
case 71:
|
||||
case 72:
|
||||
case 73:
|
||||
case 74:
|
||||
case 75:
|
||||
case 76:
|
||||
case 77:
|
||||
case 78:
|
||||
case 79:
|
||||
case 80:
|
||||
this->Slot08();
|
||||
if (this->render.isMotionFinished) {
|
||||
this->Slot15(0, 1);
|
||||
}
|
||||
return true;
|
||||
case 8: {
|
||||
this->Slot08();
|
||||
const int frames = static_cast<int>(this->GetElapsedFrames());
|
||||
if (this->hitTargetAid != 0 && frames % 34 == 0) {
|
||||
CRenderObject* target = static_cast<CGameMode*>(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->hitTargetAid);
|
||||
if (target) {
|
||||
this->Face(target->render.position.x, target->render.position.z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case 51:
|
||||
this->Slot08();
|
||||
if (this->render.isMotionFinished == true) {
|
||||
this->render.unknown_0070 = 2;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
return CGameActor::OnProcess();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4798,12 +4798,7 @@ bool C3dGrannyGameActor::OnProcess() {
|
|||
this->ProcessActorEffects();
|
||||
this->UpdateHpGauge();
|
||||
|
||||
union {
|
||||
void (CGameActor::*asVoid)();
|
||||
bool (CGameActor::*asBool)();
|
||||
} slot14;
|
||||
slot14.asVoid = &CGameActor::Slot14;
|
||||
const bool result = (this->*slot14.asBool)();
|
||||
const bool result = this->Slot14();
|
||||
|
||||
float facing = this->render.angle;
|
||||
if (facing > 360.0f) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public:
|
|||
const std::uint32_t* palette, const SpriteRleImage* image, int blend, short hover
|
||||
) override;
|
||||
void Slot12(SpriteQuad* quad, const int* box, float shiftX, int first, int second) override;
|
||||
void Slot14() override;
|
||||
bool Slot14() override;
|
||||
void Slot16() override;
|
||||
void Slot29(int value) override;
|
||||
void Slot32() override;
|
||||
|
|
|
|||
|
|
@ -46,15 +46,6 @@ std::uint32_t g_groundMarkAltAid;
|
|||
// GLOBAL: gl_25143
|
||||
std::uint32_t g_groundMarkAltEnabled;
|
||||
|
||||
static bool CallSlot14(CGameActor* actor) {
|
||||
union {
|
||||
void (CGameActor::*asVoid)();
|
||||
bool (CGameActor::*asBool)();
|
||||
} slot14;
|
||||
slot14.asVoid = &CGameActor::Slot14;
|
||||
return (actor->*slot14.asBool)();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DA1190
|
||||
// FUNCTION: fn_22354
|
||||
CCorpse::CCorpse() {
|
||||
|
|
@ -1405,7 +1396,7 @@ bool CNpc::OnProcess() {
|
|||
case 111:
|
||||
this->ProcessDamageMessages();
|
||||
this->UpdateGaugePositions();
|
||||
result = CallSlot14(this);
|
||||
result = this->Slot14();
|
||||
break;
|
||||
default:
|
||||
this->ProcessBodyState();
|
||||
|
|
@ -1415,7 +1406,7 @@ bool CNpc::OnProcess() {
|
|||
this->ModifyArgb(8, 8, 8, 8);
|
||||
}
|
||||
this->UpdateGaugePositions();
|
||||
result = CallSlot14(this);
|
||||
result = this->Slot14();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue