Skip to content

Commit 81403f4

Browse files
committed
Merge branch 'master' into csharp-api
2 parents c247ef8 + ccc8f91 commit 81403f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+7352
-610
lines changed

.github/workflows/build-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: windows-latest
88
strategy:
99
matrix:
10-
target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS]
10+
target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS, PRAGMATA]
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.github/workflows/dev-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: windows-latest
4040
strategy:
4141
matrix:
42-
target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS]
42+
target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6, DD2, MHWILDS, PRAGMATA]
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ src/CommitHash.autogenerated
1616
csharp-api/test/Test/bin
1717
csharp-api/test/Test/obj
1818
csharp-api/build/
19+

CMakeLists.txt

Lines changed: 1057 additions & 2 deletions
Large diffs are not rendered by default.

MakeCommitHash.bat

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ FOR /F "tokens=*" %%b IN ('git rev-parse --abbrev-ref HEAD') DO (SET REF_BRANCH=
2424
FOR /F "tokens=*" %%n IN ('git rev-list --count HEAD') DO (SET REF_TOTAL_COMMITS=%%n)
2525
IF "%REF_TOTAL_COMMITS%"=="" (SET REF_TOTAL_COMMITS=0)
2626

27-
FOR /F "tokens=2 delims==" %%a IN ('wmic OS get localdatetime /value') DO (
28-
SET datetime=%%a
29-
)
27+
FOR /F "tokens=* delims=" %%a IN ('powershell -NoProfile -Command "Get-Date -Format yyyyMMddHHmm"') DO (SET datetime=%%a)
3028

3129
SET year=%datetime:~0,4%
3230
SET month=%datetime:~4,2%
@@ -42,4 +40,4 @@ echo #define REF_COMMITS_PAST_TAG %REF_COMMITS_PAST_TAG% >> src/CommitHash.autog
4240
echo #define REF_BRANCH "%REF_BRANCH%" >> src/CommitHash.autogenerated
4341
echo #define REF_TOTAL_COMMITS %REF_TOTAL_COMMITS% >> src/CommitHash.autogenerated
4442
echo #define REF_BUILD_DATE "%day%.%month%.%year%" >> src/CommitHash.autogenerated
45-
echo #define REF_BUILD_TIME "%hour%:%minute%" >> src/CommitHash.autogenerated
43+
echo #define REF_BUILD_TIME "%hour%:%minute%" >> src/CommitHash.autogenerated

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ Supports both DirectX 11 and DirectX 12.
5656
* Monster Hunter Rise
5757
* Monster Hunter Wilds
5858
* Dragon's Dogma 2
59-
* Ghosts 'n Goblins Resurrection (Using RE8 build)
60-
* Apollo Justice: Ace Attorney Trilogy (Using DD2 build)
61-
* Kunitsu-Gami: Path of the Goddess (Using DD2 build)
59+
* Ghosts 'n Goblins Resurrection (Using `RE8` build)
60+
* Apollo Justice: Ace Attorney Trilogy (Using `DD2` build)
61+
* Kunitsu-Gami: Path of the Goddess (Using `DD2` build)
62+
* Onimusha 2: Samurai's Destiny (Using `MHWILDS` build)
6263

6364
## Thanks
6465
[SkacikPL](https://github.com/SkacikPL) for originally creating the Manual Flashlight mod.

cmake.toml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ set(ASMJIT_STATIC ON CACHE BOOL "" FORCE)
1717
set(DYNAMIC_LOADER ON CACHE BOOL "" FORCE) # OpenXR
1818
set(BUILD_TOOLS OFF CACHE BOOL "" FORCE) # DirectXTK
1919
set(SAFETYHOOK_FETCH_ZYDIS ON)
20+
set(FT_DISABLE_HARFBUZZ ON CACHE BOOL "" FORCE) # Freetype
2021
2122
if ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
2223
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT")
@@ -61,6 +62,7 @@ REF_BUILD_MHRISE_SDK = false
6162
REF_BUILD_SF6_SDK = false
6263
REF_BUILD_DD2_SDK = false
6364
REF_BUILD_MHWILDS_SDK = false
65+
REF_BUILD_PRAGMATA_SDK = false
6466
REF_BUILD_FRAMEWORK = { value = true }
6567
REF_BUILD_DEPENDENCIES = { value = true }
6668

@@ -80,6 +82,7 @@ build-mhrise-sdk = "REF_BUILD_MHRISE_SDK OR REF_BUILD_FRAMEWORK"
8082
build-sf6-sdk = "REF_BUILD_SF6_SDK OR REF_BUILD_FRAMEWORK"
8183
build-dd2-sdk = "REF_BUILD_DD2_SDK OR REF_BUILD_FRAMEWORK"
8284
build-mhwilds-sdk = "REF_BUILD_MHWILDS_SDK OR REF_BUILD_FRAMEWORK"
85+
build-pragmata-sdk = "REF_BUILD_PRAGMATA_SDK OR REF_BUILD_FRAMEWORK"
8386
build-framework-dependencies = "REF_BUILD_DEPENDENCIES AND CMAKE_SIZEOF_VOID_P EQUAL 8"
8487

8588
[fetch-content.asmjit]
@@ -132,13 +135,26 @@ condition = "build-framework-dependencies"
132135
git = "https://github.com/cursey/safetyhook"
133136
tag = "b046e123dc69821f2c375161e0adef3c6d9c9db4"
134137

138+
[fetch-content.freetype]
139+
git = "https://github.com/freetype/freetype"
140+
tag = "f1cd6dbfa0c98f352b698448f40ac27e8fb3832e"
141+
135142
[target.imgui]
136143
type = "static"
137-
sources = ["dependencies/imgui/*.cpp"]
138-
include-directories = ["dependencies/imgui", "src/re2-imgui"]
144+
sources = [
145+
"dependencies/imgui/*.cpp",
146+
"dependencies/imgui/misc/freetype/imgui_freetype.cpp",
147+
]
148+
include-directories = [
149+
"dependencies/imgui",
150+
"dependencies/imgui/misc/freetype",
151+
"src/re2-imgui"]
139152
compile-definitions = [
140153
"IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/src/re2-imgui/re2_imconfig.hpp\"",
141154
]
155+
link-libraries = [
156+
"freetype"
157+
]
142158
condition = "build-framework"
143159

144160
[target.imguizmo]
@@ -191,7 +207,7 @@ tag = "v1.34.10"
191207

192208
[fetch-content.kananlib]
193209
git = "https://github.com/cursey/kananlib"
194-
tag = "d659e3b8312e26ba19329f96b73ba88d1211bfdb"
210+
tag = "3a2448d5b12afd607f02af231571ec76443cb545"
195211

196212
[target.utility]
197213
type = "static"
@@ -378,6 +394,14 @@ condition = "build-mhwilds-sdk"
378394
[target.MHWILDS]
379395
type = "game"
380396

397+
[target.PRAGMATASDK]
398+
type = "sdk"
399+
compile-definitions = ["PRAGMATA", "REENGINE_PACKED", "REENGINE_AT"]
400+
condition = "build-pragmata-sdk"
401+
402+
[target.PRAGMATA]
403+
type = "game"
404+
381405
[template.plugin]
382406
type = "shared"
383407
include-directories = ["include/"]

dependencies/imgui

Submodule imgui updated 100 files

dependencies/imnodes/imnodes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void ImDrawListGrowChannels(ImDrawList* draw_list, const int num_channels)
354354
{
355355
ImDrawCmd draw_cmd;
356356
draw_cmd.ClipRect = draw_list->_ClipRectStack.back();
357-
draw_cmd.TextureId = draw_list->_TextureIdStack.back();
357+
draw_cmd.TexRef = draw_list->_TextureStack.back();
358358
channel._CmdBuffer.push_back(draw_cmd);
359359
}
360360
}

include/reframework/API.hpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,13 @@ class API {
529529
static const auto fn = API::s_instance->sdk()->type_definition->get_methods;
530530

531531
std::vector<API::Method*> methods;
532-
methods.resize(get_num_methods());
532+
533+
auto num_methods = get_num_methods();
534+
if (num_methods < 1) {
535+
return {};
536+
}
537+
538+
methods.resize(num_methods);
533539

534540
auto result = fn(*this, (REFrameworkMethodHandle*)&methods[0], methods.size() * sizeof(API::Method*), nullptr);
535541

@@ -544,7 +550,14 @@ class API {
544550
static const auto fn = API::s_instance->sdk()->type_definition->get_fields;
545551

546552
std::vector<API::Field*> fields;
547-
fields.resize(get_num_fields());
553+
554+
555+
auto num_fields = get_num_fields();
556+
if (num_fields < 1) {
557+
return {};
558+
}
559+
560+
fields.resize(num_fields);
548561

549562
auto result = fn(*this, (REFrameworkFieldHandle*)&fields[0], fields.size() * sizeof(API::Field*), nullptr);
550563

@@ -681,7 +694,13 @@ class API {
681694
static const auto fn = API::s_instance->sdk()->method->get_params;
682695

683696
std::vector<REFrameworkMethodParameter> params;
684-
params.resize(get_num_params());
697+
698+
auto num_params = get_num_params();
699+
if (num_params < 1) {
700+
return {};
701+
}
702+
703+
params.resize(num_params);
685704

686705
auto result = fn(*this, (REFrameworkMethodParameter*)&params[0], params.size() * sizeof(REFrameworkMethodParameter), nullptr);
687706

0 commit comments

Comments
 (0)