From eef3f6d730f94ea006fb40dd649a439f52fce3b6 Mon Sep 17 00:00:00 2001 From: krystalgamer Date: Sat, 13 Jul 2024 16:21:47 +0200 Subject: [PATCH] CDocOc::PlayidleOrGloatAnim --- docock.cpp | 41 +++++++++++++++++++++++++++++++++++++++-- docock.h | 7 +++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/docock.cpp b/docock.cpp index 9db69a6..58ef4cd 100644 --- a/docock.cpp +++ b/docock.cpp @@ -89,9 +89,41 @@ void INLINE CDocOc::PlaySingleAnim(unsigned int a2, int a3, int a4) this->RunAnim(a2, a3, a4); } -// @SMALLTODO +extern CBody* MechList[1]; + +// @Ok void CDocOc::PlayIdleOrGloatAnim(void) -{} +{ + if ((this->field_218 & 8) == 0) + { + if (!this->field_554) + { + this->PlaySingleAnim(32, 0, -1); + } + else + { + this->CalculateStage(); + if (this->field_55C <= 600 && MechList[0]->field_E2 > 0) + { + if (this->field_550 == 1) + this->PlaySingleAnim(5, 0, -1); + else + this->PlaySingleAnim(0, 0, -1); + } + else + { + if (this->field_550 == 1) + this->PlaySingleAnim(35, 0, -1); + else + this->PlaySingleAnim(1, 0, -1); + + this->field_55C = 0; + this->field_31C.bothFlags = 0x8000; + this->dumbAssPad = 0; + } + } + } +} // @Ok void __inline CDocOc::Gloat(void) @@ -231,6 +263,8 @@ void CDocOc::HangAndGetBeaten(void) } extern CBaddy* ControlBaddyList; +// @NotOk +// missing tag INLINE void CDocOc::ResolveSwitches(void) { i32 index = 0; @@ -247,6 +281,8 @@ INLINE void CDocOc::ResolveSwitches(void) print_if_false(index == 4, "Error"); } +// @NotOk +// missing tag void CDocOc::Initialise(void) { this->field_518 = 455; @@ -297,5 +333,6 @@ void validate_CDocOc(void){ VALIDATE(CDocOc, field_550, 0x550); VALIDATE(CDocOc, field_554, 0x554); + VALIDATE(CDocOc, field_55C, 0x55C); VALIDATE(CDocOc, field_570, 0x570); } diff --git a/docock.h b/docock.h index a578b13..b87469e 100644 --- a/docock.h +++ b/docock.h @@ -52,8 +52,11 @@ public: unsigned char padAfter518[0x550-0x518-4]; i32 field_550; - int field_554; - unsigned char padAfter554[0x570-0x554-4]; + i32 field_554; + u8 padAfter554[0x55C-0x554-4]; + + i32 field_55C; + u8 padAfter55C[0x570-0x55C-4]; void* field_570;