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:
ragnarok-clanker 2026-11-01 00:00:02 +00:00
commit 4deff9e985
6 changed files with 140 additions and 38 deletions

View file

@ -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();
}
}