Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcating committed Nov 2, 2024
1 parent 5d22c66 commit c759724
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 81 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.12a ~ [2024-10-02]
# GhTrTool 0.12b ~ [2024-11-02]
## 完整更新日志
### 更新
- 支持最新版0.17b版本Perfect Voyage
- 支持最新版0.17c版本Perfect Voyage
### 正在进行
- 地址数值常数化

Expand Down
10 changes: 5 additions & 5 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 = 0x2C5E0C; //游戏LawnAPP* 实例偏移 [BaseAddress+GAME_BASE_OFFSET]
CONST DWORD GAME_BASE_OFFSET = 0x2C9E74; //游戏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_SUN_OFFSET = 0x45C; //阳光 偏移 [[[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 = 0x9FC29;//种植植物阳光减少 偏移 [BaseAddress+GAME_PLANT_SUB_SUN_OFFSET]
CONST DWORD GAME_PLANT_SUB_SUN_OFFSET = 0xA0699;//种植植物阳光减少 偏移 [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 = 0x1025C9; //重新种植更新当前冷却 偏移 [BaseAddress+GAME_PLANT_NO_CD_OFFSET]
CONST DWORD GAME_PLANT_NO_CD_OFFSET = 0x1062B9; //重新种植更新当前冷却 偏移 [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 = 0x10288D; //判断冷却是否结束 偏移 [BaseAddress+GAME_PLANT_IGNORE_CD_OFFSET]
CONST DWORD GAME_PLANT_IGNORE_CD_OFFSET = 0x10657D; //判断冷却是否结束 偏移 [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"; //判断冷却是否结束_原码 操作码
144 changes: 77 additions & 67 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.17b"
#define GAME_NAME L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17c"

class GhTrManager
{
Expand Down
Binary file modified GhTrTool/GhTrTool.rc
Binary file not shown.
1 change: 1 addition & 0 deletions GhTrTool/GhTrTool.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<UACUIAccess>false</UACUIAccess>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand Down
6 changes: 5 additions & 1 deletion GhTrTool/InfoDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ BOOL InfoDialog::OnInitDialog()
{_T("淀粉海"), _T("14")},
{_T("伶初玫瑰"), _T("15")},
{_T("磁力菇"), _T("16")},
{_T("土豆地雷"), _T("17")},
{_T("金银花"), _T("17")},
{_T("神秘植物"), _T("18")},
{_T("土豆地雷"), _T("19")},
};
// 插入列
m_List.InsertColumn(0, _T("植物名称"), LVCFMT_LEFT, 100);
Expand Down Expand Up @@ -95,6 +97,8 @@ BOOL InfoDialog::OnInitDialog()
{_T("迷蒙神隐"), _T("7")},
{_T("绽凌原野"), _T("8")},
{_T("绽凌殿"), _T("9")},
{_T("烛隙瀚海·雪地"), _T("10")},
{_T("烛隙瀚海·沙漠"), _T("11")},
};
// 插入列
m_List3.InsertColumn(0, _T("背景名称"), LVCFMT_LEFT, 100);
Expand Down
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.17b";
const wchar_t* GAME_TITLE = L"Plants Vs Zombies GhTr ~ Perfect Voyage ver.0.17c";
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.17b版本
[+]修改了偏移,适配于GhTr.0.17c版本

[+]Modify offset handling to support GhTr 0.17b version
[+]Modify offset handling to support GhTr 0.17c version
### [#]工具截图 Screenshot
[+]工具版本:0.12a
[+]工具版本:0.12b

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

Expand Down

0 comments on commit c759724

Please sign in to comment.