Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
add 50.11 classic win64 offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Oct 4, 2023
1 parent b0e7dd8 commit 5453480
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
39 changes: 39 additions & 0 deletions config/offsets/50.11_classic_win64.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[metadata]
name = "dfint localization hook offsets"
version = "50.11 classic win64"
checksum = 0x65190584

[offsets]
# translation
string_copy = 0xBA90
string_copy_n = 0xBAB0
string_append = 0xB860
string_append_0 = 0xB880
string_append_n = 0xBBF0
convert_ulong_to_string = 0x3BA8B0
addst = 0x7FADE0
addst_top = 0x7FAEC0
addcoloredst = 0x7FAA70
addst_flag = 0x7FAB50
# search
standardstringentry = 0x9006C0
simplify_string = 0x3BB240
upper_case_string = 0x3BB580
lower_case_string = 0x3BB3E0
capitalize_string_words = 0x3BB720
capitalize_string_first_word = 0x3BB9A0
# ttf
addchar = 0x56A60
addchar_top = 0x118030
add_texture = 0xF2E220
gps_allocate = 0x62AF30
cleanup_arrays = 0x62AD50
screen_to_texid = 0x624110
screen_to_texid_top = 0x624300
# game state
loading_world_new_game_loop = 0xA81D10
loading_world_continuing_game_loop = 0x5CE820
loading_world_start_new_game_loop = 0x5CCB20
menu_interface_loop = 0x19BA20
# keybinding shift
keybinding = 370
14 changes: 7 additions & 7 deletions src/hook/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

namespace Config {

constexpr const auto PATH_OFFSETS = "./dfint_data/offsets/";
constexpr const auto PATH_LOG = "./dfint_data/dfint_log.log";
constexpr const auto PATH_DICTIONARY = "./dfint_data/dfint_dictionary.csv";
constexpr const auto PATH_REPORTS = "./dfint_data/crash_reports/";
const std::filesystem::path PATH_OFFSETS{ "./dfint_data/offsets/" };
const std::filesystem::path PATH_LOG{ "./dfint_data/dfint_log.log" };
const std::filesystem::path PATH_DICTIONARY{ "./dfint_data/dfint_dictionary.csv" };
const std::filesystem::path PATH_REPORTS{ "./dfint_data/crash_reports/" };

inline time_t PETimestamp(const std::string filename) {
std::ifstream file(filename);
Expand Down Expand Up @@ -72,13 +72,13 @@ namespace Config {
namespace Setting {

inline auto log_level = Config::config["settings"]["log_level"].value_or<int>(0);
inline auto log_file = Config::config["settings"]["log_file"].value_or<std::string>(PATH_LOG);
inline auto log_file = Config::config["settings"]["log_file"].value_or<std::string>(PATH_LOG.string());
inline auto crash_report = Config::config["settings"]["crash_report"].value_or<bool>(true);
inline auto enable_search = Config::config["settings"]["enable_search"].value_or<bool>(true);
inline auto enable_translation = Config::config["settings"]["enable_translation"].value_or<bool>(true);
inline auto enable_patches = Config::config["settings"]["enable_patches"].value_or<bool>(true);
inline auto dictionary = Config::config["settings"]["dictionary"].value_or<std::string>(PATH_DICTIONARY);
inline auto crash_report_dir = Config::config["settings"]["crash_report_dir"].value_or<std::string>(PATH_REPORTS);
inline auto dictionary = Config::config["settings"]["dictionary"].value_or<std::string>(PATH_DICTIONARY.string());
inline auto crash_report_dir = Config::config["settings"]["crash_report_dir"].value_or<std::string>(PATH_REPORTS.string());
inline auto watchdog = Config::config["settings"]["watchdog"].value_or<bool>(true);

} // namespace Setting
Expand Down
4 changes: 1 addition & 3 deletions src/hook/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "patches.h"
#include "watchdog.hpp"

extern "C" __declspec(dllexport) VOID NullExport(VOID) {}

BOOL ProcessAttach() {
InitLogger();
if (Config::Setting::watchdog) {
Expand Down Expand Up @@ -64,7 +62,7 @@ BOOL ProcessDetach() {
return TRUE;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
extern "C" __declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
if (Config::Setting::crash_report) {
CrashReport::Install();
}
Expand Down

0 comments on commit 5453480

Please sign in to comment.