Skip to content

Commit a22e4e6

Browse files
author
Maki
committed
basic imgui hack impl
1 parent c717e5d commit a22e4e6

File tree

187 files changed

+83676
-3
lines changed

Some content is hidden

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

187 files changed

+83676
-3
lines changed

ff8_demaster/config.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ void ReadConfigFile()
3333
HASH_OUTPUT_EXT = conf.GetInteger("", "HASH_OUTPUT_EXT", 0);
3434
HASH_LOAD_HD = conf.GetInteger("", "HASH_LOAD_HD", 1);
3535
HASH_LOAD_HD_EXT = conf.GetInteger("", "HASH_LOAD_HD_EXT", 1);
36+
IMGUI_DEBUG = conf.GetInteger("", "IMGUI_DEBUG", 0);
3637
}

ff8_demaster/config.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ inline int UVPATCH;
66
inline int DIRECT_IO;
77
inline int TEXTURE_PATCH;
88
inline int DEBUG_PATCH;
9+
inline int IMGUI_DEBUG;
910
inline int LOG;
1011
inline int BATTLE_CHARA;
1112
inline int FIELD_ENTITY;

ff8_demaster/dllmain.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ void GetWindow()
4343
const unsigned int wndGlfw = IMAGE_BASE + GetAddress(WINDOWTITLE) + 0x12
4444
+ *reinterpret_cast<DWORD*>(IMAGE_BASE + GetAddress(WINDOWTITLE) + 0x12) + 4;
4545
MH_CreateHook(reinterpret_cast<LPVOID>(wndGlfw), HookGlfwWindow, &glfwWindowTrampoline);
46+
const unsigned int wndGlfwInit = IMAGE_BASE + GetAddress(WINDOWTITLE) - 0xA2
47+
+ *reinterpret_cast<DWORD*>(IMAGE_BASE + GetAddress(WINDOWTITLE) - 0xA2) + 4;
48+
MH_CreateHook(reinterpret_cast<LPVOID>(wndGlfwInit), HookGlfwInit, &glfwInitTrampoline);
4649
}
4750

4851

ff8_demaster/ff8_demaster.vcxproj

+23
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ del $(SolutionDir).dist\$(Configuration)\$(AssemblyName).lib</Command>
228228
<ClCompile Include="debug.cpp" />
229229
<ClCompile Include="dllmain.cpp" />
230230
<ClCompile Include="image.cpp" />
231+
<ClCompile Include="imgui\backends\imgui_impl_glfw.cpp" />
232+
<ClCompile Include="imgui\backends\imgui_impl_opengl3.cpp" />
233+
<ClCompile Include="imgui\backends\imgui_impl_win32.cpp" />
234+
<ClCompile Include="imgui\imgui.cpp" />
235+
<ClCompile Include="imgui\imgui_draw.cpp" />
236+
<ClCompile Include="imgui\imgui_tables.cpp" />
237+
<ClCompile Include="imgui\imgui_widgets.cpp" />
231238
<ClCompile Include="iopatch.cpp" />
232239
<ClCompile Include="minhook\src\buffer.c" />
233240
<ClCompile Include="minhook\src\hde\hde32.c" />
@@ -252,6 +259,16 @@ del $(SolutionDir).dist\$(Configuration)\$(AssemblyName).lib</Command>
252259
<ClInclude Include="coreHeader.h" />
253260
<ClInclude Include="debug.h" />
254261
<ClInclude Include="image.h" />
262+
<ClInclude Include="imgui\backends\imgui_impl_glfw.h" />
263+
<ClInclude Include="imgui\backends\imgui_impl_opengl3.h" />
264+
<ClInclude Include="imgui\backends\imgui_impl_opengl3_loader.h" />
265+
<ClInclude Include="imgui\backends\imgui_impl_win32.h" />
266+
<ClInclude Include="imgui\imconfig.h" />
267+
<ClInclude Include="imgui\imgui.h" />
268+
<ClInclude Include="imgui\imgui_internal.h" />
269+
<ClInclude Include="imgui\imstb_rectpack.h" />
270+
<ClInclude Include="imgui\imstb_textedit.h" />
271+
<ClInclude Include="imgui\imstb_truetype.h" />
255272
<ClInclude Include="minhook\include\MinHook.h" />
256273
<ClInclude Include="minhook\src\buffer.h" />
257274
<ClInclude Include="minhook\src\hde\hde32.h" />
@@ -272,7 +289,13 @@ del $(SolutionDir).dist\$(Configuration)\$(AssemblyName).lib</Command>
272289
<ItemGroup>
273290
<ResourceCompile Include="minhook\dll_resources\MinHook.rc" />
274291
</ItemGroup>
292+
<ItemGroup>
293+
<Content Include="imgui\LICENSE.txt" />
294+
</ItemGroup>
275295
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
276296
<ImportGroup Label="ExtensionTargets">
277297
</ImportGroup>
298+
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
299+
<VcpkgUseStatic>true</VcpkgUseStatic>
300+
</PropertyGroup>
278301
</Project>

ff8_demaster/imgui/.editorconfig

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# See http://editorconfig.org to read about the EditorConfig format.
2+
# - In theory automatically supported by VS2017+ and most common IDE or text editors.
3+
# - In practice VS2019-VS2022 stills don't trim trailing whitespaces correctly :(
4+
# - Suggest installing this to trim whitespaces:
5+
# GitHub https://github.com/madskristensen/TrailingWhitespace
6+
# VS2019 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer
7+
# VS2022 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespace64
8+
# (in spite of its name doesn't only visualize but also trims)
9+
# - Alternative for older VS2010 to VS2015: https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig
10+
11+
# top-most EditorConfig file
12+
root = true
13+
14+
# Default settings:
15+
# Use 4 spaces as indentation
16+
[*]
17+
indent_style = space
18+
indent_size = 4
19+
insert_final_newline = true
20+
trim_trailing_whitespace = true
21+
22+
[imstb_*]
23+
indent_size = 3
24+
trim_trailing_whitespace = false
25+
26+
[Makefile]
27+
indent_style = tab
28+
indent_size = 4

ff8_demaster/imgui/.gitattributes

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
* text=auto
2+
3+
*.c text
4+
*.cpp text
5+
*.h text
6+
*.m text
7+
*.mm text
8+
*.md text
9+
*.txt text
10+
*.html text
11+
*.bat text
12+
*.frag text
13+
*.vert text
14+
*.mkb text
15+
*.icf text
16+
17+
*.sln text eol=crlf
18+
*.vcxproj text eol=crlf
19+
*.vcxproj.filters text eol=crlf
20+
*.natvis text eol=crlf
21+
22+
Makefile text eol=lf
23+
*.sh text eol=lf
24+
*.pbxproj text eol=lf
25+
*.storyboard text eol=lf
26+
*.plist text eol=lf
27+
28+
*.png binary
29+
*.ttf binary
30+
*.lib binary

ff8_demaster/imgui/.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## OSX artifacts
2+
.DS_Store
3+
4+
## Dear ImGui artifacts
5+
imgui.ini
6+
7+
## General build artifacts
8+
*.o
9+
*.obj
10+
*.exe
11+
examples/build/*
12+
examples/*/Debug/*
13+
examples/*/Release/*
14+
examples/*/x64/*
15+
16+
## Visual Studio artifacts
17+
.vs
18+
ipch
19+
*.opensdf
20+
*.log
21+
*.pdb
22+
*.ilk
23+
*.user
24+
*.sdf
25+
*.suo
26+
*.VC.db
27+
*.VC.VC.opendb
28+
29+
## Commonly used CMake directories
30+
/build*/
31+
32+
## Xcode artifacts
33+
project.xcworkspace
34+
xcuserdata
35+
36+
## Emscripten artifacts
37+
examples/*.o.tmp
38+
examples/*.out.js
39+
examples/*.out.wasm
40+
examples/example_emscripten_opengl3/web/*
41+
examples/example_emscripten_wgpu/web/*
42+
43+
## JetBrains IDE artifacts
44+
.idea
45+
cmake-build-*
46+
47+
## Unix executables from our example Makefiles
48+
examples/example_glfw_metal/example_glfw_metal
49+
examples/example_glfw_opengl2/example_glfw_opengl2
50+
examples/example_glfw_opengl3/example_glfw_opengl3
51+
examples/example_glut_opengl2/example_glut_opengl2
52+
examples/example_null/example_null
53+
examples/example_sdl_metal/example_sdl_metal
54+
examples/example_sdl_opengl2/example_sdl_opengl2
55+
examples/example_sdl_opengl3/example_sdl_opengl3
56+
examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer

ff8_demaster/imgui/LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014-2022 Omar Cornut
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)