Skip to content

Commit

Permalink
fect. 支持新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcating committed Oct 2, 2024
1 parent ec6a1a3 commit fabf6bc
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 80 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GhTrTool 0.11z ~ [2024-8-22]
# GhTrTool 0.12a ~ [2024-8-22]
## 完整更新日志
### 更新
- 支持最新版0.17a Experiment-1版本Perfect Voyage
- 支持最新版0.17b版本Perfect Voyage
### 正在进行
- 地址数值常数化

Expand Down
8 changes: 4 additions & 4 deletions GhTrTool/Constant.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#pragma once
CONST DWORD GAME_BASE_OFFSET = 0x2B9CE4; //游戏LawnAPP* 实例偏移 [BaseAddress+GAME_BASE_OFFSET]
CONST DWORD GAME_BASE_OFFSET = 0x2C5E0C; //游戏LawnAPP* 实例偏移 [BaseAddress+GAME_BASE_OFFSET]
CONST DWORD GAME_BOARD_OFFSET = 0x730; //游戏Board*板 实例偏移 [[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]
CONST DWORD GAME_SUN_OFFSET = 0x384; //阳光 偏移 [[[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]+GAME_SUN_OFFSET]
CONST DWORD GAME_CARD_OFFSET = 0x14C; //卡槽 实例偏移 [[[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]+GAME_CARD_OFFSET]
CONST DWORD GAME_CARD_NUMBER_OFFSET = 0x24; //卡槽个数 偏移 [[[[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]+GAME_CARD_OFFSET]+GAME_CARD_NUMBER_OFFSET]
CONST DWORD GAME_CARD_ID_OFFSET = 0x2C; //卡槽ID 偏移 [[[[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]+GAME_CARD_OFFSET]+GAME_CARD_ID_OFFSET]
CONST DWORD GAME_CARD_SIZE = 0x38; //卡槽类大小
CONST DWORD GAME_CARD_ID_START_OFFSET = 0x1C; //卡槽ID特殊起始点 偏移 [[[[[BaseAddress+GAME_BASE_OFFSET]+GAME_BOARD_OFFSET]+GAME_CARD_OFFSET]+GAME_CARD_ID_OFFSET]+GAME_CARD_ID_START_OFFSET]
CONST DWORD GAME_PLANT_SUB_SUN_OFFSET = 0x9DBA9;//种植植物阳光减少 偏移 [BaseAddress+GAME_PLANT_SUB_SUN_OFFSET]
CONST DWORD GAME_PLANT_SUB_SUN_OFFSET = 0x9FC29;//种植植物阳光减少 偏移 [BaseAddress+GAME_PLANT_SUB_SUN_OFFSET]
CONST CHAR* GAME_PLANT_SUB_SUN_PATCH_OPCODE = "\x90\x90\x90\x90\x90\x90"; //种植植物阳光减少_阳光不减少 操作码
CONST CHAR* GAME_PLANT_SUB_SUN_ORIGINAL_OPCODE = "\x29\xBE\x84\x03\x00\x00"; //种植植物阳光减少_原码 操作码
CONST DWORD GAME_PLANT_NO_CD_OFFSET = 0xFF219; //重新种植更新当前冷却 偏移 [BaseAddress+GAME_PLANT_NO_CD_OFFSET]
CONST DWORD GAME_PLANT_NO_CD_OFFSET = 0x1025C9; //重新种植更新当前冷却 偏移 [BaseAddress+GAME_PLANT_NO_CD_OFFSET]
CONST CHAR* GAME_CARD_NO_CD_PATCH_OPCODE = "\xC7\x42\x24\x00\x00\x00\x00\x90\x90\x90"; //重新种植更新当前冷却_重置冷却设为0 操作码
CONST CHAR* GAME_CARD_NO_CD_ORIGINAL_OPCODE = "\x89\x42\x24\xC7\x42\x20\x00\x00\x00\x00"; //重新种植更新当前冷却_原码 操作码
CONST DWORD GAME_PLANT_IGNORE_CD_OFFSET = 0xFF4DD; //判断冷却是否结束 偏移 [BaseAddress+GAME_PLANT_IGNORE_CD_OFFSET]
CONST DWORD GAME_PLANT_IGNORE_CD_OFFSET = 0x10288D; //判断冷却是否结束 偏移 [BaseAddress+GAME_PLANT_IGNORE_CD_OFFSET]
CONST CHAR* GAME_CARD_IGNORE_CD_PATCH_OPCODE = "\x90\x90"; //判断冷却是否结束_不判断 操作码
CONST CHAR* GAME_CARD_IGNORE_CD_ORIGINAL_OPCODE = "\x39\x08"; //判断冷却是否结束_原码 操作码
127 changes: 65 additions & 62 deletions GhTrTool/GhTr.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion GhTrTool/GhTr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include <filesystem>
#include "json.hpp"
#define GAME_NAME L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17a Experiment-1"
#define GAME_NAME L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17b"

class GhTrManager
{
Expand Down
Binary file modified GhTrTool/GhTrTool.rc
Binary file not shown.
3 changes: 0 additions & 3 deletions GhTrTool/GhTrTool.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Constant.h" />
<ClInclude Include="json.hpp" />
Expand Down
3 changes: 0 additions & 3 deletions GhTrTool/GhTrTool.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="GhTrTool.h">
<Filter>头文件</Filter>
Expand Down
1 change: 1 addition & 0 deletions GhTrTool/GhTrToolDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ class CGhTrToolDlg : public CDialogEx
afx_msg void OnBnClickedBtnInfoDialogList();
void OnTimer(UINT_PTR nIDEvent);
CEdit m_edit;
afx_msg void OnBnClickedStaticPack();
};
2 changes: 1 addition & 1 deletion GhTrTool/macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct FileInfoNode {
}
};

const wchar_t* GAME_TITLE = L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17a Experiment-1";
const wchar_t* GAME_TITLE = L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17b";
const wchar_t* GAME_PROCESS_NAME_CAPITAL = L"PlantsVsZombies.exe";
const wchar_t* GAME_PROCESS_NAME_LOWER = L"plantsvszombies.exe";

Expand Down
Binary file modified Image/AboutGUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Image/GameTest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Image/InfoGUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Image/MainGUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ PlantsVsZombies ~ GhTr *PersonGames Tools*

[+]what *functions* r needed, pls click [here](https://github.com/Xcating/GhTrTool/issues) propose and **TRY** todo it as well as ***possible***
### [#]修改 Modified
[+]修改了偏移,适配于GhTr.0.17a Experiment-1版本
[+]修改了偏移,适配于GhTr.0.17b版本

[+]Modify offset handling to support GhTr 0.17a Experiment-1 version
[+]Modify offset handling to support GhTr 0.17b version
### [#]工具截图 Screenshot
[+]工具版本:0.11z
[+]工具版本:0.12a

[+]Tools Version: 0.11z
[+]Tools Version: 0.12a
![MainGUI](/Image/MainGUI.png "MainGUI")
![GameTest](/Image/GameTest.png "GameTest")

Expand Down

0 comments on commit fabf6bc

Please sign in to comment.