diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 79b255e..b5f4739 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -39,12 +39,35 @@ public: void SetAnimation(unsigned animation, int motion, int repeat) override; + virtual void Slot08() = 0; + virtual void Slot09(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh, int twelfth, int thirteenth, int fourteenth, int fifteenth, int sixteenth, int seventeenth) = 0; + virtual void Slot10(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth) = 0; + virtual void Slot11(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth) = 0; + virtual void Slot12(int first, int second, int third, int fourth, int fifth) = 0; + virtual void Slot13() = 0; + virtual void Slot14() = 0; + virtual void Slot15(int first, int second) = 0; + virtual void Slot16() = 0; + virtual void Slot17() = 0; virtual void Slot18(int first, int second, int third); + virtual void Slot19(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) = 0; + virtual void Slot20(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) = 0; virtual void Slot21(int value); virtual void Slot22(int value); virtual void Slot23(int first, int second); + virtual void Slot24(int first, int second) = 0; virtual void Slot25(int value); + virtual void Slot26(int value) = 0; + virtual void Slot27(int value) = 0; + virtual void Slot28(int value) = 0; + virtual void Slot29(int value) = 0; virtual void Slot30(); + virtual void Slot31() = 0; + virtual void Slot32() = 0; + virtual void Slot33(int value) = 0; + virtual void Slot34(int value) = 0; + virtual void Slot35() = 0; + virtual void Slot36() = 0; void SetUnknown0305(unsigned char value, int extra); void SetUnknown0318(const float* value, int index); diff --git a/Source/Contents/Actors/Pc.h b/Source/Contents/Actors/Pc.h index ddfd973..dd26bef 100644 --- a/Source/Contents/Actors/Pc.h +++ b/Source/Contents/Actors/Pc.h @@ -7,6 +7,10 @@ #include #include +class C3dGrannyModelRes; +struct granny_control; +struct granny_model_instance; + class CPc : public CGameActor { public: ~CPc() override; @@ -14,11 +18,20 @@ public: CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m ) override; + void Slot34(int value) override; + float* GetExtent(float* extent) const; /* 0410 */ unsigned char unknown_0410[8]; /* 0418 */ std::string unknown_0418; - /* 0430 */ unsigned char unknown_0430[0xB4]; + /* 0430 */ int unknown_0430; + /* 0434 */ int unknown_0434; + /* 0438 */ unsigned char unknown_0438[0x0C]; + /* 0444 */ int unknown_0444; + /* 0448 */ unsigned char unknown_0448[0x10]; + /* 0458 */ int unknown_0458; + /* 045C */ int unknown_045C; + /* 0460 */ unsigned char unknown_0460[0x84]; /* 04E4 */ float unknown_04E4; /* 04E8 */ float unknown_04E8; /* 04EC */ float unknown_04EC; @@ -66,7 +79,65 @@ public: /* 0514 */ int unknown_0514; }; +class CPlayer : public CPc { +public: + static int AngleToDirection(float angle); + + bool IsSpecialState(int state) const; +}; + +class CGrannyPc : public CGameActor { +public: + void SetAnimation(unsigned animation, int motion, int repeat) 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; + void Slot21(int value) override; + void Slot22(int value) override; + void Slot23(int first, int second) override; + void Slot24(int first, int second) override; + void Slot25(int value) override; + void Slot26(int value) override; + void Slot27(int value) override; + + void PlayMotion(int repeat); + + /* 0410 */ std::string unknown_0410; + /* 0428 */ int unknown_0428; + /* 042C */ int unknown_042C; + /* 0430 */ unsigned char unknown_0430[4]; + /* 0434 */ int unknown_0434; + /* 0438 */ unsigned char unknown_0438[8]; + /* 0440 */ int unknown_0440; + /* 0444 */ int unknown_0444; + /* 0448 */ int unknown_0448; + /* 044C */ int unknown_044C; + /* 0450 */ int unknown_0450; + /* 0454 */ int unknown_0454; + /* 0458 */ unsigned char unknown_0458[8]; + /* 0460 */ std::string unknown_0460; + /* 0478 */ unsigned char unknown_0478[0x0C]; + /* 0484 */ C3dGrannyModelRes* model; + /* 0488 */ unsigned char unknown_0488[0x28]; + /* 04B0 */ granny_model_instance* instance; + /* 04B4 */ unsigned char unknown_04B4[0xA70]; + /* 0F24 */ int unknown_0F24; + /* 0F28 */ unsigned char unknown_0F28[0x14]; + /* 0F3C */ int motion; + /* 0F40 */ unsigned char unknown_0F40[0x110]; + /* 1050 */ granny_control* controls[20]; +}; + #if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(CPc, unknown_0430) == 0x430); +static_assert(offsetof(CPc, unknown_0444) == 0x444); +static_assert(offsetof(CPc, unknown_0458) == 0x458); +static_assert(offsetof(CGrannyPc, unknown_0428) == 0x428); +static_assert(offsetof(CGrannyPc, unknown_0440) == 0x440); +static_assert(offsetof(CGrannyPc, unknown_0460) == 0x460); +static_assert(offsetof(CGrannyPc, model) == 0x484); +static_assert(offsetof(CGrannyPc, instance) == 0x4B0); +static_assert(offsetof(CGrannyPc, unknown_0F24) == 0xF24); +static_assert(offsetof(CGrannyPc, motion) == 0xF3C); +static_assert(offsetof(CGrannyPc, controls) == 0x1050); static_assert(sizeof(CBlurPC) == 0x510); static_assert(sizeof(CHalluPC) == 0x518); static_assert(sizeof(CHalluPC2) == 0x518); diff --git a/Source/Contents/Actors/Player.cpp b/Source/Contents/Actors/Player.cpp new file mode 100644 index 0000000..8c8f41e --- /dev/null +++ b/Source/Contents/Actors/Player.cpp @@ -0,0 +1,33 @@ +#include "Contents/Actors/Pc.h" + +#include "Client/Session.h" +#include "Resource/Models/GrannyModelResource.h" + +// OFFSET: 0x00DAFE50 + +// OFFSET: 0x00DB01F0 + +// OFFSET: 0x00DB0280 + +// OFFSET: 0x00DB07E0 + +// OFFSET: 0x00DB09D0 + +// OFFSET: 0x00DB0B40 + +// OFFSET: 0x00DB0CB0 + +// OFFSET: 0x00DB1980 + +// OFFSET: 0x00DB1AC0 + +// OFFSET: 0x00DB2830 +// FUNCTION: fn_22646 +void CGrannyPc::Slot24(int, int) { +} + +// OFFSET: 0x00DB3720 + +// OFFSET: 0x00DB51E0 + +// OFFSET: 0x00DB52B0 diff --git a/data/compile.json b/data/compile.json index f7d3870..366b6e3 100644 --- a/data/compile.json +++ b/data/compile.json @@ -276,6 +276,7 @@ "Source/Contents/Actors/AttackMotion.cpp": 4, "Source/Contents/Actors/GameObject.cpp": 4, "Source/Contents/Actors/MercenaryAI.cpp": 4, + "Source/Contents/Actors/Player.cpp": 4, "Source/Contents/Actors/RenderObject.cpp": 4, "Source/Contents/Actors/RenderObjectState.cpp": 4, "Source/Contents/Actors/SpriteDrawingPolicy.cpp": 4,