├── Screenshots
├── MENU Extra.png
├── Tiny Console.png
├── MENU Debug Info.png
├── Capture Screen 1.png
├── Capture Screen 2.png
└── MENU 3D Map Grid.png
├── SimpleROHookCS
├── SimpleROHookCS.ico
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── app.config
├── app.manifest
├── NPCLogger.Designer.cs
├── ToolStripTrackBar.cs
├── Program.cs
├── SRHAboutBox.cs
├── NPCLogger.cs
├── NPCLogger.resx
├── SimpleROHookCS.csproj
├── SRHSharedData.cs
└── SRHAboutBox.Designer.cs
├── Injection
├── packages.config
├── stdafx.cpp
├── targetver.h
├── resource.h
├── Core
│ ├── ro
│ │ ├── packet.h
│ │ ├── mouse.h
│ │ ├── system.h
│ │ ├── res.h
│ │ ├── task.h
│ │ ├── ui.h
│ │ ├── map.h
│ │ └── unit.h
│ ├── shared.h
│ ├── FastFont
│ │ ├── CacheInfo.h
│ │ ├── FastFont.h
│ │ ├── SFastFont.h
│ │ ├── CacheInfo.cpp
│ │ └── FastFont.cpp
│ ├── SearchCode.h
│ ├── PerformanceCounter.h
│ └── RoCodeBind.h
├── tinyconsole.h
├── Hook.h
├── Hook.cpp
├── stdafx.h
├── ProxyIDirectInput.cpp
├── ProxyHelper.h
├── ReadMe.txt
├── Injection.rc
├── ProxyIDirectInput.h
├── tinyconsole.cpp
├── Injection.vcxproj.filters
├── Injection.vcxproj
└── ProxyIDirectDraw.cpp
├── .gitignore
├── .gitattributes
├── .github
└── FUNDING.yml
├── SimpleROHook.sln
├── thirdparty.txt
└── README.md
/Screenshots/MENU Extra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/MENU Extra.png
--------------------------------------------------------------------------------
/Screenshots/Tiny Console.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/Tiny Console.png
--------------------------------------------------------------------------------
/Screenshots/MENU Debug Info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/MENU Debug Info.png
--------------------------------------------------------------------------------
/Screenshots/Capture Screen 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/Capture Screen 1.png
--------------------------------------------------------------------------------
/Screenshots/Capture Screen 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/Capture Screen 2.png
--------------------------------------------------------------------------------
/Screenshots/MENU 3D Map Grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/Screenshots/MENU 3D Map Grid.png
--------------------------------------------------------------------------------
/SimpleROHookCS/SimpleROHookCS.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/X-EcutiOnner/SimpleROHook/HEAD/SimpleROHookCS/SimpleROHookCS.ico
--------------------------------------------------------------------------------
/Injection/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Injection/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp: Standard include Core.pch only
2 | // The source file it contains will be a precompiled header.
3 | // stdafx.obj contains precompiled type information.
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: Required in STDAFX.H, not this file
8 | // See additional headers.
9 |
--------------------------------------------------------------------------------
/Injection/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Include SDKDDKVer.h to define the highest level Windows platform available.
4 |
5 | // If you want to build your application for older Windows platforms, include WinSDKVer.h and
6 | // Before including SDKDDKVer.h, set the _WIN32_WINNT macro to indicate the supported platforms.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/Injection/resource.h:
--------------------------------------------------------------------------------
1 | // {{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Core.rc
4 |
5 | // The following defaults for the new object
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Global ##
2 | [Tt]humbs.db
3 | *.7z
4 | *.rar
5 | *.*zip
6 |
7 | ## Injection ##
8 | Injection/versioninfo.h
9 |
10 | ## Nuget Packages ##
11 | packages/
12 |
13 | ## Visual Studio ##
14 | .vs/
15 | obj/
16 | ipch/
17 | [Bb]in
18 | *[Dd]ebug*/
19 | *[Rr]elease*/
20 | *.db
21 | *.obj
22 | *.sdf
23 | *.lib
24 | *.dll
25 | *.exe
26 | *.suo
27 | *.pdb
28 | *.aps
29 | *.ipch
30 | *.user
31 | *.vspscc
32 | *.opendb
33 | *.opensdf
34 |
35 | ## Visual Studio Code ##
36 | .vscode/
37 | /.vscode
38 | /.vscode/*.json
39 |
--------------------------------------------------------------------------------
/Injection/Core/ro/packet.h:
--------------------------------------------------------------------------------
1 | enum PACKET_HEADER
2 | {
3 | HEADER_ZC_SAY_DIALOG = 0xb4,
4 | HEADER_ZC_MENU_LIST = 0xb7,
5 | };
6 |
7 | #pragma pack(push, 1)
8 |
9 | #pragma warning(push)
10 | #pragma warning(disable : 4200)
11 |
12 | struct PACKET_CZ_SAY_DIALOG
13 | {
14 | WORD PacketType;
15 | WORD PacketLength;
16 | DWORD AID;
17 | BYTE Data[];
18 | };
19 |
20 | struct PACKET_CZ_MENU_LIST
21 | {
22 | WORD PacketType;
23 | WORD PacketLength;
24 | DWORD AID;
25 | BYTE Data[];
26 | };
27 |
28 | #pragma warning(pop)
29 |
30 | #pragma pack(pop)
31 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.7z filter=lfs diff=lfs merge=lfs -text
2 | *.rar filter=lfs diff=lfs merge=lfs -text
3 | *.*zip filter=lfs diff=lfs merge=lfs -text
4 |
5 | *.db filter=lfs diff=lfs merge=lfs -text
6 | *.dll filter=lfs diff=lfs merge=lfs -text
7 | *.lib filter=lfs diff=lfs merge=lfs -text
8 | *.exe filter=lfs diff=lfs merge=lfs -text
9 | *.inf filter=lfs diff=lfs merge=lfs -text
10 | *.p7s filter=lfs diff=lfs merge=lfs -text
11 | *.nupkg filter=lfs diff=lfs merge=lfs -text
12 |
13 | *.md text eol=crlf
14 | *.ini text eol=crlf
15 | *.lua text eol=crlf
16 | *.lub text eol=crlf
17 | *.txt text eol=crlf
18 | *.html text eol=crlf
19 | *.yml diff text eol=crlf
20 |
--------------------------------------------------------------------------------
/Injection/Core/ro/mouse.h:
--------------------------------------------------------------------------------
1 | enum EBtnState
2 | {
3 | BTN_NONE = 0,
4 | BTN_DOWN,
5 | BTN_PRESSED,
6 | BTN_UP,
7 | BTN_DBLCLK
8 | };
9 |
10 | class CMouse
11 | {
12 | public:
13 | IDirectInput7* m_lpdi;
14 | IDirectInputDevice7* m_pMouse;
15 | LPVOID m_hevtMouse;
16 | int m_xDelta;
17 | int m_yDelta;
18 | int m_xPos;
19 | int m_yPos;
20 | int m_wheel;
21 | int m_oldBtnState[3];
22 | EBtnState m_btnState[3];
23 | int m_dblclkCnt[3];
24 | DWORD m_dblclkTime;
25 | DWORD m_bSwapButton;
26 | };
27 |
--------------------------------------------------------------------------------
/Injection/tinyconsole.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void DebugLogger(const char* format, ...);
4 | void DebugLoggerWithLogWindow(const char* format, ...);
5 |
6 | #define DEBUG_LOGGING_NORMAL(a) DebugLoggerWithLogWindow a
7 | // #define DEBUG_LOGGING_DETAIL(a) DebugLoggerWithLogWindow a
8 | // #define DEBUG_LOGGING_MORE_DETAIL(a) DebugLogger a
9 |
10 | #ifndef DEBUG_LOGGING_NORMAL
11 | #define DEBUG_LOGGING_NORMAL(a)
12 | #endif
13 |
14 | #ifndef DEBUG_LOGGING_DETAIL
15 | #define DEBUG_LOGGING_DETAIL(a)
16 | #endif
17 |
18 | #ifndef DEBUG_LOGGING_MORE_DETAIL
19 | #define DEBUG_LOGGING_MORE_DETAIL(a)
20 | #endif
21 |
22 | void CreateTinyConsole(void);
23 | void ReleaseTinyConsole(void);
24 |
--------------------------------------------------------------------------------
/Injection/Hook.h:
--------------------------------------------------------------------------------
1 | // The following ifdef blocks are a common way to create macros that facilitate export from a DLL.
2 | // All files in this DLL are compiled using the INJECTION_EXPORTS symbol defined on the command line.
3 | // This symbol cannot be defined in projects that use this DLL.
4 | // Other projects whose source file contains this file
5 | // Consider the CORE_API function to be imported from a DLL,
6 | // While this DLL considers the symbols defined in this macro to be exported.
7 | #ifdef INJECTION_EXPORTS
8 | extern HINSTANCE g_hDLL;
9 | #define INJECTION_API extern "C" __declspec(dllexport)
10 | #else
11 | #define INJECTION_API extern "C" __declspec(dllimport)
12 | #endif
13 |
14 | INJECTION_API void InstallHook();
15 | INJECTION_API void RemoveHook();
16 |
--------------------------------------------------------------------------------
/Injection/Core/shared.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define SHAREDMEMORY_OBJECTNAME _T("SimpleROHook1011")
4 |
5 | enum COPYDATAENTRY
6 | {
7 | COPYDATA_NPCLogger = 127
8 | };
9 |
10 | typedef struct _StSHAREDMEMORY
11 | {
12 | HWND g_hROWindow;
13 |
14 | DWORD executeorder;
15 |
16 | BOOL write_packetlog;
17 | BOOL freemouse;
18 | int cast_range;
19 | int ground_zbias;
20 | int alphalevel;
21 | BOOL m2e;
22 | BOOL bbe;
23 | BOOL deadcell;
24 | BOOL chatscope;
25 | BOOL castrange;
26 | BOOL fix_windowmode_vsyncwait;
27 | BOOL show_framerate;
28 | BOOL objectinformation;
29 | BOOL _44khz_audiomode;
30 | int cpucoolerlevel;
31 | BOOL chainload;
32 |
33 | WCHAR configfilepath[MAX_PATH];
34 | WCHAR musicfilename[MAX_PATH];
35 |
36 | } StSHAREDMEMORY;
37 |
--------------------------------------------------------------------------------
/Injection/Hook.cpp:
--------------------------------------------------------------------------------
1 | // Core.cpp: DLL Defines the function to be exported for the application.
2 | #include "Hook.h"
3 |
4 | HINSTANCE g_hDLL;
5 |
6 | // This segment must be defined as SHARED in the .DEF
7 | #pragma data_seg (".HookShared")
8 |
9 | // Shared instance for all processes.
10 | HHOOK g_hHook = NULL;
11 | #pragma data_seg()
12 |
13 | #pragma comment(linker, "/Section:.HookShared,rws")
14 |
15 | LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam)
16 | {
17 | return ::CallNextHookEx(g_hHook, nCode, wParam, lParam);
18 | }
19 |
20 | INJECTION_API void InstallHook()
21 | {
22 | g_hHook = ::SetWindowsHookEx(WH_CBT, HookProc, g_hDLL, 0);
23 | }
24 |
25 | INJECTION_API void RemoveHook()
26 | {
27 | ::UnhookWindowsHookEx(g_hHook);
28 | g_hHook = NULL;
29 | }
30 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: xecutionner # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/SimpleROHookCS/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 0, 0, 200, 400
7 |
8 |
9 | Normal
10 |
11 |
12 | True
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Injection/Core/FastFont/CacheInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | typedef long s32;
4 | typedef unsigned long u32;
5 | typedef short s16;
6 | typedef unsigned short u16;
7 | typedef char s8;
8 | typedef unsigned char u8;
9 |
10 | #ifndef NULL
11 | #define NULL 0
12 | #endif
13 |
14 | class CacheInfo
15 | {
16 | typedef struct StCacheInfo
17 | {
18 | u32 OriginalKey;
19 | u32 Value;
20 |
21 | void *pData;
22 |
23 | StCacheInfo *pPrev;
24 | StCacheInfo *pNext;
25 |
26 | StCacheInfo *pPrevHash;
27 | StCacheInfo *pNextHash;
28 | } StCacheInfo;
29 |
30 | public:
31 | // CacheInfo();
32 | CacheInfo(int HashTopTables);
33 | virtual ~CacheInfo(void);
34 |
35 | void ClearCache(void);
36 | void *CreateData(int hashkey, int datasize);
37 | void *GetCacheData(int hashkey);
38 |
39 | int DebugGetHashEntrys(int hashtableno);
40 |
41 | private:
42 | int m_CacheNums;
43 | int m_HashRootTables;
44 |
45 | StCacheInfo m_CacheRoot;
46 | StCacheInfo *m_HashRootTable;
47 | };
48 |
--------------------------------------------------------------------------------
/SimpleROHookCS/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | 0, 0, 200, 400
12 |
13 |
14 | Normal
15 |
16 |
17 | True
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Injection/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h: Include file for standard system include files, or
2 | // write a project-specific include file that is referenced frequently
3 | // and does not change much.
4 | //
5 |
6 | #pragma once
7 |
8 | #include "TargetVer.h"
9 |
10 | #define WIN32_LEAN_AND_MEAN // Exclude unused parts from the Windows header.
11 |
12 | // Windows Header Files:
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 |
20 | #pragma comment(lib, "shlwapi.lib")
21 | #pragma comment(lib, "ddraw.lib")
22 | #pragma comment(lib, "dinput.lib")
23 | #pragma comment(lib, "dxguid.lib")
24 | #pragma comment(lib, "winmm.lib")
25 |
26 | #define DIRECTINPUT_VERSION 0x0700
27 | #include
28 | #include
29 | #include
30 |
31 | // TODO: See here for any additional headers required by your program.
32 | #include
33 |
34 | #include
35 |
36 | #include
37 | #include
38 | #include
39 | #include