From 15abad8bd64833be03aa1c5f711e7acc7277b28c Mon Sep 17 00:00:00 2001 From: KionX <> Date: Sat, 27 Jan 2024 15:53:10 +0500 Subject: [PATCH] Upd moho.h --- Info.txt | 1 + section/include/moho.h | 56 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/Info.txt b/Info.txt index 230961ba..9d3f0afb 100644 --- a/Info.txt +++ b/Info.txt @@ -158,6 +158,7 @@ LuaObjectFinalize 0040A0A0 CreateStatItemRoot(EngineStats*):eax 00408730 InitStatItem(StatItem*, char* name):eax 008E5050 CalcHash +0090AC10 CreateLuaPlus 005D62B0 CreateCAiAttackerImpl 005D6AA0 InitCAiAttackerImpl 005D5D90 AiAttacker::GetWeaponCount diff --git a/section/include/moho.h b/section/include/moho.h index 32fe5b45..eb9c78f5 100644 --- a/section/include/moho.h +++ b/section/include/moho.h @@ -661,6 +661,7 @@ struct EntityChain // [[Entities+4]+4] }; struct Sim; +struct Unit; struct Entity : CScriptObject { // 0x270 bytes // at 0x68 @@ -684,6 +685,50 @@ struct Prop : Entity RPropBlueprint *Blueprint; }; +struct CUnitCommand; +struct CCommandTask +{ //0x34 bytes + void* vtable; + void* unk0; // self+4; + // at 0x10 + CCommandTask *prevTask; // ? + // at 0x1C + Unit *owner; + Sim *sim; + // at 0x28 + //CCommandTask *prevTask; -0x2C +}; + +struct CUnitMobileBuildTask : CCommandTask +{ //0xE8 bytes + // at 0xC + Unit *owner; + Sim *sim; + Unit *target0; // -4 + CCommandTask *next; // ? + // at 0x2C + string name; + float FractionComplete; + // at 0x50 + CUnitCommand *unitCommand; + RUnitBlueprint *build; + float unk0, unk1, unk2, unk3; + // at 0x84 + Unit *target1; // -4 +}; + +struct CUnitRepairTask : CCommandTask +{ //0x9C bytes + // at 0xC + Unit *owner; + Sim *sim; + // at 0x2C + string name; + // at 0x50 + CUnitCommand *unitCommand; + Unit *target; // -4 +}; + struct CUnitCommand { // 0x178 bytes void *vtable; @@ -691,6 +736,10 @@ struct CUnitCommand void *unk2; LuaObject UserData; LuaObject Table; + // at 0x34 + CCommandTask *task; // -4 + // at 0x40 + Sim *sim; // at 0x4C float unk3; // at 0x5C @@ -718,7 +767,6 @@ struct SCommand void *nil; }; -struct Unit; struct CommandQueue { // 0x28 bytes void *unk1; @@ -851,7 +899,9 @@ struct Unit : WeakObject float WorkRate; // at 0x544 void* IAiAttacker; - // at 0x55C + void* IAiCommandDispatch; + // at 0x558 + void* IAiSiloBuild; void* IAiTransport; // at 0x59C Vector3f Pos6; @@ -1382,6 +1432,8 @@ struct Clutter struct Silhouette { // 0x74? bytes void* vtable; + // at 0xC + CUIWorldView *worldView; }; struct WRenViewport // : WD3DViewport