diff --git a/README.md b/README.md index 48c39248..9a5fd44a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ This are just the patch files for this game. I decided to separate them from pat # Change List ## Fixes +- Upgrade Progress Fix + - hooks/HUpgradeProgressFix.cpp + - section/UpgradeProgressFix.cpp - Allows to use 4GB on x64 - hooks/HFix4GB.cpp - Reduce call sim beat of UI diff --git a/hooks/HUpgradeProgressFix.cpp b/hooks/HUpgradeProgressFix.cpp new file mode 100644 index 00000000..86a4af09 --- /dev/null +++ b/hooks/HUpgradeProgressFix.cpp @@ -0,0 +1,5 @@ +#include "../define.h" +asm( + ".section h0; .set h0,0x5F5C21;" + "JMP "QU(UpgradeProgressFix)";" +); diff --git a/section/UpgradeProgressFix.cpp b/section/UpgradeProgressFix.cpp new file mode 100644 index 00000000..e03e57c7 --- /dev/null +++ b/section/UpgradeProgressFix.cpp @@ -0,0 +1,12 @@ +void UpgradeProgressFix() { + asm( + "MOV EAX,[EBP+8];" + "MOV EAX,[EAX-4+0xE0];" + "MOV [EBP+0x3C],EAX;" + "MOV EDX,[EBP];" + "MOV [EDX+0x2AC],EAX;" + "MOV EAX,DWORD PTR DS:[ECX];" + "MOV EDX,DWORD PTR DS:[EAX+0x3C];" + "JMP 0x5F5C26;" + ); +} \ No newline at end of file diff --git a/section/include/moho.h b/section/include/moho.h index 3c412e2d..63fbe896 100644 --- a/section/include/moho.h +++ b/section/include/moho.h @@ -773,8 +773,12 @@ struct Unit : WeakObject // at 0x294 float FuelRatio; float ShieldRatio; // Readonly + // at 0x2A0 + bool Paused; // at 0x2AC float WorkProgress; + // at 0x2CC + string customUnitName; // at 0x380 UserUnitWeapon* Weapons; list unk22; // Weapons? @@ -830,6 +834,10 @@ struct UserUnit : UserEntity // at 0x44 int UnitID; RUnitBlueprint *blueprint; + // at 0x1B0 + bool Paused; + // at 0x1BC + float WorkProgress; // at 0x1DC string customUnitName; // at 0x290