Renamed tp6.c to core.c
This commit is contained in:
Binary file not shown.
7
game_payload/include/core.h
Normal file
7
game_payload/include/core.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <game.h>
|
||||
|
||||
void core_setup_patcher(struct game_data *game, HMODULE baseModule);
|
||||
@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <game.h>
|
||||
|
||||
void tp6_setup_patcher(struct game_data *game, HMODULE baseModule);
|
||||
@ -38,34 +38,34 @@ res_object = custom_target(
|
||||
command: [ gen_res, '--object', meson.current_source_dir(), '@OUTPUT0@', '@INPUT@' ]
|
||||
)
|
||||
|
||||
if fs.exists('src/tp6.c')
|
||||
if fs.exists('src/core.c')
|
||||
# Compile the real file first (dirty hack)
|
||||
tp6c_fake_exe = executable(
|
||||
'tp6c.o',
|
||||
'src/tp6.c',
|
||||
core_fake_exe = executable(
|
||||
'core.o',
|
||||
'src/core.c',
|
||||
res_header,
|
||||
link_args: [ '-r' ], # Output an object file
|
||||
include_directories: include_dir
|
||||
)
|
||||
|
||||
# another dirty hack
|
||||
copy_tp6c = find_program('copy_tp6c.sh')
|
||||
copy_core = find_program('copy_core.sh')
|
||||
|
||||
tp6c_target = [custom_target(
|
||||
'copy_tp6c',
|
||||
output: 'tp6c.o',
|
||||
input: tp6c_fake_exe.extract_all_objects(recursive: false),
|
||||
core_target = [custom_target(
|
||||
'copy_core',
|
||||
output: 'core.o',
|
||||
input: core_fake_exe.extract_all_objects(recursive: false),
|
||||
command: [
|
||||
copy_tp6c,
|
||||
copy_core,
|
||||
'@INPUT0@',
|
||||
'@OUTPUT0@', meson.current_source_dir() / 'blob/tp6c.o'
|
||||
'@OUTPUT0@', meson.current_source_dir() / 'blob/core.o'
|
||||
]
|
||||
)]
|
||||
tp6c_blob = []
|
||||
core_blob = []
|
||||
else
|
||||
message('Using precompiled tp6c blob. Refer to the readme for more details')
|
||||
tp6c_target = []
|
||||
tp6c_blob = [ 'blob/tp6c.o' ]
|
||||
message('Using precompiled core blob. Refer to the readme for more details')
|
||||
core_target = []
|
||||
core_blob = [ 'blob/core.o' ]
|
||||
endif
|
||||
|
||||
shared_library(
|
||||
@ -73,8 +73,8 @@ shared_library(
|
||||
sources,
|
||||
res_header,
|
||||
res_object,
|
||||
tp6c_target,
|
||||
objects: tp6c_blob,
|
||||
core_target,
|
||||
objects: core_blob,
|
||||
include_directories: include_dir,
|
||||
name_prefix: ''
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include <ntdll.h>
|
||||
#include <ace.h>
|
||||
#include <game.h>
|
||||
#include <tp6.h>
|
||||
#include <core.h>
|
||||
#include <utils.h>
|
||||
|
||||
#include <main.h>
|
||||
@ -46,7 +46,7 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) {
|
||||
ace_load_driver_module();
|
||||
|
||||
// ...magic
|
||||
tp6_setup_patcher(&game, baseModule);
|
||||
core_setup_patcher(&game, baseModule);
|
||||
|
||||
// Load the UnityPlayer module and invoke the callback
|
||||
HMODULE unityModule = LoadLibraryA("UnityPlayer.dll");
|
||||
|
||||
Reference in New Issue
Block a user