Skip to content

Commit

Permalink
Merge branch 'master' into pd-upscaler
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Apr 5, 2024
2 parents 94c8eed + 2dbae5d commit ef7b329
Show file tree
Hide file tree
Showing 29 changed files with 980 additions and 170 deletions.
32 changes: 28 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(directxtk12)

message(STATUS "Fetching safetyhook (44200343bf803f78862426e301e9382e5b28ea2c)...")
message(STATUS "Fetching safetyhook (4faf792c2d66cbf06f2c942561d053aafd79006b)...")
FetchContent_Declare(
safetyhook
GIT_REPOSITORY
https://github.com/cursey/safetyhook
GIT_TAG
44200343bf803f78862426e301e9382e5b28ea2c
4faf792c2d66cbf06f2c942561d053aafd79006b
)
FetchContent_MakeAvailable(safetyhook)

Expand All @@ -134,13 +134,13 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(bddisasm)

message(STATUS "Fetching kananlib (b0323a0b005fc9e3944e0ea36dcc98eda4b84eea)...")
message(STATUS "Fetching kananlib (05fe2456b58fa423531d036d9343ae46866d7ffd)...")
FetchContent_Declare(
kananlib
GIT_REPOSITORY
https://github.com/cursey/kananlib
GIT_TAG
b0323a0b005fc9e3944e0ea36dcc98eda4b84eea
05fe2456b58fa423531d036d9343ae46866d7ffd
)
FetchContent_MakeAvailable(kananlib)

Expand Down Expand Up @@ -2294,6 +2294,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -2346,6 +2347,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -2504,6 +2506,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -2556,6 +2559,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -4405,6 +4409,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -4457,6 +4462,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -4615,6 +4621,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -4667,6 +4674,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -4825,6 +4833,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -4877,6 +4886,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -7573,6 +7583,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -7625,6 +7636,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -7783,6 +7795,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -7835,6 +7848,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -8840,6 +8854,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -8892,6 +8907,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -9895,6 +9911,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -9947,6 +9964,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -10952,6 +10970,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -11004,6 +11023,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -12009,6 +12029,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -12061,6 +12082,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down Expand Up @@ -13066,6 +13088,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.cpp"
"src/mods/Hooks.cpp"
"src/mods/IntegrityCheckBypass.cpp"
"src/mods/LooseFileLoader.cpp"
"src/mods/ManualFlashlight.cpp"
"src/mods/PluginLoader.cpp"
"src/mods/REFrameworkConfig.cpp"
Expand Down Expand Up @@ -13118,6 +13141,7 @@ if(REF_BUILD_FRAMEWORK AND CMAKE_SIZEOF_VOID_P EQUAL 8) # build-framework
"src/mods/Graphics.hpp"
"src/mods/Hooks.hpp"
"src/mods/IntegrityCheckBypass.hpp"
"src/mods/LooseFileLoader.hpp"
"src/mods/ManualFlashlight.hpp"
"src/mods/PluginLoader.hpp"
"src/mods/REFrameworkConfig.hpp"
Expand Down
4 changes: 4 additions & 0 deletions MakeCommitHash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exit /b 0
FOR /F "tokens=*" %%g IN ('git rev-parse HEAD') DO (SET REF_COMMIT_HASH=%%g)

FOR /F "tokens=*" %%t IN ('git describe --tags --abbrev^=0') DO (SET REF_TAG=%%t)
IF "%REF_TAG%"=="" (SET REF_TAG=no_tag)

FOR /F "tokens=*" %%c IN ('git describe --tags --long') DO (
FOR /F "tokens=1,2 delims=-" %%a IN ("%%c") DO (
Expand All @@ -16,9 +17,12 @@ SET REF_COMMITS_PAST_TAG=%%b
)
)

IF "%REF_COMMITS_PAST_TAG%"=="" (SET REF_COMMITS_PAST_TAG=0)

FOR /F "tokens=*" %%b IN ('git rev-parse --abbrev-ref HEAD') DO (SET REF_BRANCH=%%b)

FOR /F "tokens=*" %%n IN ('git rev-list --count HEAD') DO (SET REF_TOTAL_COMMITS=%%n)
IF "%REF_TOTAL_COMMITS%"=="" (SET REF_TOTAL_COMMITS=0)

FOR /F "tokens=2 delims==" %%a IN ('wmic OS get localdatetime /value') DO (
SET datetime=%%a
Expand Down
4 changes: 2 additions & 2 deletions cmake.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ condition = "build-framework-dependencies"

[fetch-content.safetyhook]
git = "https://github.com/cursey/safetyhook"
tag = "44200343bf803f78862426e301e9382e5b28ea2c"
tag = "4faf792c2d66cbf06f2c942561d053aafd79006b"

[target.imgui]
type = "static"
Expand Down Expand Up @@ -184,7 +184,7 @@ tag = "v1.34.10"

[fetch-content.kananlib]
git = "https://github.com/cursey/kananlib"
tag = "b0323a0b005fc9e3944e0ea36dcc98eda4b84eea"
tag = "05fe2456b58fa423531d036d9343ae46866d7ffd"

[target.utility]
type = "static"
Expand Down
12 changes: 6 additions & 6 deletions reversing/dd2.genny
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ namespace via.typeinfo {
}
}

namespace tdb71 {
namespace tdb73 {
struct TypeDefinition{}
}

namespace {


struct ManagedVtable {
tdb71.TypeDefinition* t
tdb73.TypeDefinition* t
void* funcs[32]
}
}
Expand All @@ -318,11 +318,11 @@ struct DeserializeSequence {
uint32_t is_static : 1;

uint32_t offset;
tdb71.TypeDefinition* native_type;
tdb73.TypeDefinition* native_type;
};
}

namespace tdb71 {
namespace tdb73 {
struct MethodDefinition 0xC {
uint32_t declaring_typeid : 19;
uint32_t pad : 13
Expand Down Expand Up @@ -446,8 +446,8 @@ namespace tdb71 {
struct test{}
uint32_t magic; // 0x0000
uint32_t version; // 0x0004
uint32_t initialized; // 0x0008
uint32_t numTypes; // 0x000C
uint32_t numTypes; // 0x0008
uint32_t typesStartOfGenericsProbably; // 0x000C
uint32_t numMethods; // 0x0010
uint32_t numFields; // 0x0014
uint32_t numTypeImpl; // 0x0018
Expand Down
5 changes: 4 additions & 1 deletion reversing/rsz/non-native-dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def generate_field_entries(il2cpp_dump, natives, key, il2cpp_entry, use_typedefs
return fields_out, struct_str, i, struct_i


def main(out_postfix="", il2cpp_path="", natives_path=None, use_typedefs=False, use_hashkeys=False):
def main(out_postfix="", il2cpp_path="", natives_path=None, use_typedefs=False, use_hashkeys=False, include_parents=False):
if il2cpp_path is None:
return

Expand Down Expand Up @@ -462,6 +462,9 @@ def main(out_postfix="", il2cpp_path="", natives_path=None, use_typedefs=False,

json_entry["crc"] = entry["crc"]

if include_parents and "parent" in entry:
json_entry["parent"] = entry["parent"]

struct_str = "// " + entry["fqn"] + "\n"
struct_str = struct_str + "struct " + key + " {\n"

Expand Down
2 changes: 2 additions & 0 deletions reversing/rsz/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Uses [Unicorn](https://github.com/unicorn-engine/unicorn) to emulate all of the
* path to `native_layouts_(exe_name).json` that was generated by `emulation-dumper.py`
* `use_typedefs`
* `use_hashkeys`
* `include_parents`
* Will add the parent object name to the struct or omitted if not found.

### Outputs
`rsz(out_postfix).json`
Loading

0 comments on commit ef7b329

Please sign in to comment.