Skip to content

Commit

Permalink
SDK: Update regenny files
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Aug 19, 2022
1 parent a0f7eb5 commit 33a3a99
Show file tree
Hide file tree
Showing 25 changed files with 372 additions and 12 deletions.
124 changes: 123 additions & 1 deletion reversing/nierautomata.genny
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type uint64_t 8 [[u64]]
type int64_t 8 [[i64]]
type int32_t 4 [[i32]]
type uint32_t 4 [[u32]]
type int16_t 2 [[i16]]
Expand All @@ -11,6 +12,15 @@ type wchar_t 2 [[u16]]
type bool 1 [[u8]]

namespace regenny{
struct RTL_CRITICAL_SECTION {
void* DebugInfo;
int32_t LockCount;
int32_t RecursionCount;
void* OwningThread;
void* LockSemaphore;
uint32_t SpinCount;
};

struct UnkEntityData 0x1000 {
};

Expand Down Expand Up @@ -45,7 +55,8 @@ enum ERunSpeedType : uint32_t {
SPEED_BUDDY = 1,
};

struct CharacterController 0x1000 {
struct CharacterController 0x850 {
RTL_CRITICAL_SECTION critical_section @ 0x88;
uint32_t held_flags @ 0x738;
uint32_t flags;
uint32_t buttons[8] + 0x30;
Expand All @@ -66,11 +77,23 @@ struct Parts 8 {
virtual void destructor();
};

struct cModelExtendWorkBase 8 {
void* vftable
};

struct cModelExtendWork : cModelExtendWorkBase 0x250 {
};

struct Model : Parts 0x590 {
Vector4f position @ 0x50;

float facing @ 0x94;
float tick_count @ 0x9C;
Matrix4x4f model_mat4_1 @ 0xC0
Matrix4x4f model_mat4_2 @ 0x100
cModelExtendWork model_extend @ 0x140;
float _578 @ 0x578
float _57C @ 0x57C
};

struct Obj : Model 0x670 {
Expand All @@ -82,25 +105,124 @@ struct Obj : Model 0x670 {
char xmlbinary_data[0x40] @ 0x618
};

struct BehaviorExtension 0x10 {
void* vftable
};

struct Behavior : Obj 0x830 {
virtual void start_animation(uint32_t anim, uint32_t variant, uint32_t a3, uint32_t a4) @ 18
virtual void last_behavior_vfunc() @ 64

void* behavior_extension_array @ 0x6B0; // lib::StaticArray<std::pair<enum lib::TypeId,BehaviorExtension *>,16,8>
};

struct ExActionState : BehaviorExtension 0x28 {
};

struct ExNpc : BehaviorExtension 0x38 {
};

struct ExWaypoint : BehaviorExtension 0xB0 {
};

struct BehaviorAppBase : Behavior 0xC50 {
virtual void request_anim(uint32_t anim) @ 112
virtual void request_anim_table(uint32_t anim) @ 113

virtual void request_anim_op(void* a1, void* a2) @ 115
virtual void request_move(Vector4f* pos, int32_t unk) @ 116

ExActionState ex_action_state @ 0x830

uint32_t health @ 0x858;
ExNpc ex_npc @ 0xA98
ExWaypoint ex_waypoint @ 0x8E0;
uint32_t wait_flags @ 0xBC0; // 1 == wait
uint32_t talk_flags @ 0xBCC;
float anim_spd_rate @ 0xC40;
};

struct WpAnimName{}


struct ExBaseInfo 0x1F8 {
void* wp_anim_name_array @ 0x130; // placeholder, is not a pointer.
};

struct ExCollision : BehaviorExtension 0x130 {
};

struct ExExpInfo : BehaviorExtension 0xAF8 {
};

struct ExCatch : BehaviorExtension 0x80 {
};

struct ExLockOn : BehaviorExtension 0xf0 {
};

struct ExLayoutParent : BehaviorExtension 0x110 {
};

struct ExHackingInfo : BehaviorExtension 0x80 {
};

struct ExAtkCombo : BehaviorExtension {
};

struct cHitPrim 0x150 {
}

struct cObjHit : cHitPrim 0x290 {
};

struct Pl0000 : BehaviorAppBase 0x17920 {
CharacterController controller @ 0xCa0
cObjHit obj_hit @ 0x14F0
ExCollision ex_collision_1 @ 0x1790;
ExCollision ex_collision_2 @ 0x18C0;
ExBaseInfo ex_base_info @ 0x1E80;
ExExpInfo ex_exp_info @ 0x2078;
ExCatch ex_catch @ 0x2b70;
ExLockOn ex_lock_on @ 0x10030;

void* obj_array_1 @ 0x10290;

uint32_t weapon_index @ 0x107d8
uint32_t pod_index @ 0x10820
ExLayoutParent ex_layout_parent @ 0x126E0;
ExHackingInfo ex_hacking_info @ 0x12850;

//uint32_t controlled_entity_maybe2 @ 0x12AC4; // suspiciously close to hacking info.

void* obj_array_2 @ 0x12BD8;
void* obj_array_3 @ 0x12D00;
void* flight_missile_array_1 @ 0x12DD0;
void* flight_missile_array_2 @ 0x12E20;

void* obj_array_4 @ 0x12ED0;

ExAtkCombo ex_atk_combo @ 0x130f0;

void* entity_handle_array_1 @ 0x15ED8

uint32_t buddy_handle @ 0x1647c
ERunSpeedType run_speed_type @ 0x16488

void* obj_array_5 @ 0x16090; // placeholder until templates.
void* entity_handle_array_2 @ 0x16590; // placeholder until templates.
void* passive_skill_array @ 0x16608; // placeholder until templates.

uint32_t controlled_entity_maybe @ 0x16E14

bool shorts_torn @ 0x16ce4
bool wearing_mask @ 0x16cEC
bool flashlight @ 0x174b0
};

class Em0000 0x10000 {
};

struct Entity 0x1000 {
UnkEntityData* unknown;
char name[0x20] [[utf8*]]
Expand Down
4 changes: 3 additions & 1 deletion shared/sdk/regenny/Behavior.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace regenny {
#pragma pack(push, 1)
struct Behavior : public Obj {
char pad_670[0x1c0];
char pad_670[0x40];
void* behavior_extension_array; // 0x6b0
char pad_6b8[0x178];
virtual ~Behavior() = default;
virtual void virtual_function_1() = 0;
virtual void virtual_function_2() = 0;
Expand Down
11 changes: 9 additions & 2 deletions shared/sdk/regenny/BehaviorAppBase.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
#pragma once
#include "Behavior.hpp"
#include "ExActionState.hpp"
#include "ExNpc.hpp"
#include "ExWaypoint.hpp"
namespace regenny {
struct Vector4f;
}
namespace regenny {
#pragma pack(push, 1)
struct BehaviorAppBase : public Behavior {
char pad_830[0x28];
regenny::ExActionState ex_action_state; // 0x830
uint32_t health; // 0x858
char pad_85c[0x364];
char pad_85c[0x84];
regenny::ExWaypoint ex_waypoint; // 0x8e0
char pad_990[0x108];
regenny::ExNpc ex_npc; // 0xa98
char pad_ad0[0xf0];
uint32_t wait_flags; // 0xbc0
char pad_bc4[0x8];
uint32_t talk_flags; // 0xbcc
Expand Down
9 changes: 9 additions & 0 deletions shared/sdk/regenny/BehaviorExtension.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
namespace regenny {
#pragma pack(push, 1)
struct BehaviorExtension {
void* vftable; // 0x0
char pad_8[0x8];
}; // Size: 0x10
#pragma pack(pop)
}
9 changes: 6 additions & 3 deletions shared/sdk/regenny/CharacterController.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#pragma once
#include "RTL_CRITICAL_SECTION.hpp"
namespace regenny {
#pragma pack(push, 1)
struct CharacterController {
char pad_0[0x738];
char pad_0[0x88];
regenny::RTL_CRITICAL_SECTION critical_section; // 0x88
char pad_ac[0x68c];
uint32_t held_flags; // 0x738
uint32_t flags; // 0x73c
char pad_740[0x30];
Expand All @@ -11,7 +14,7 @@ struct CharacterController {
float speed; // 0x794
char pad_798[0x4];
float facing; // 0x79c
char pad_7a0[0x860];
}; // Size: 0x1000
char pad_7a0[0xb0];
}; // Size: 0x850
#pragma pack(pop)
}
8 changes: 8 additions & 0 deletions shared/sdk/regenny/Em0000.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once
namespace regenny {
#pragma pack(push, 1)
class Em0000 {
char pad_0[0x10000];
}; // Size: 0x10000
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExActionState.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExActionState : public BehaviorExtension {
char pad_10[0x18];
}; // Size: 0x28
#pragma pack(pop)
}
8 changes: 8 additions & 0 deletions shared/sdk/regenny/ExAtkCombo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExAtkCombo : public BehaviorExtension {
}; // Size: 0x10
#pragma pack(pop)
}
10 changes: 10 additions & 0 deletions shared/sdk/regenny/ExBaseInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once
namespace regenny {
#pragma pack(push, 1)
struct ExBaseInfo {
char pad_0[0x130];
void* wp_anim_name_array; // 0x130
char pad_138[0xc0];
}; // Size: 0x1f8
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExCatch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExCatch : public BehaviorExtension {
char pad_10[0x70];
}; // Size: 0x80
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExCollision.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExCollision : public BehaviorExtension {
char pad_10[0x120];
}; // Size: 0x130
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExExpInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExExpInfo : public BehaviorExtension {
char pad_10[0xae8];
}; // Size: 0xaf8
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExHackingInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExHackingInfo : public BehaviorExtension {
char pad_10[0x70];
}; // Size: 0x80
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExLayoutParent.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExLayoutParent : public BehaviorExtension {
char pad_10[0x100];
}; // Size: 0x110
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExLockOn.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExLockOn : public BehaviorExtension {
char pad_10[0xe0];
}; // Size: 0xf0
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExNpc.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExNpc : public BehaviorExtension {
char pad_10[0x28];
}; // Size: 0x38
#pragma pack(pop)
}
9 changes: 9 additions & 0 deletions shared/sdk/regenny/ExWaypoint.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include "BehaviorExtension.hpp"
namespace regenny {
#pragma pack(push, 1)
struct ExWaypoint : public BehaviorExtension {
char pad_10[0xa0];
}; // Size: 0xb0
#pragma pack(pop)
}
11 changes: 10 additions & 1 deletion shared/sdk/regenny/Model.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once
#include "Matrix4x4f.hpp"
#include "Parts.hpp"
#include "Vector4f.hpp"
#include "cModelExtendWork.hpp"
namespace regenny {
#pragma pack(push, 1)
struct Model : public Parts {
Expand All @@ -10,7 +12,14 @@ struct Model : public Parts {
float facing; // 0x94
char pad_98[0x4];
float tick_count; // 0x9c
char pad_a0[0x4f0];
char pad_a0[0x20];
regenny::Matrix4x4f model_mat4_1; // 0xc0
regenny::Matrix4x4f model_mat4_2; // 0x100
regenny::cModelExtendWork model_extend; // 0x140
char pad_390[0x1e8];
float _578; // 0x578
float _57C; // 0x57c
char pad_580[0x10];
}; // Size: 0x590
#pragma pack(pop)
}
Loading

0 comments on commit 33a3a99

Please sign in to comment.