Redirect all object buffer creation and deletion calls

This commit is contained in:
korenkonder
2023-12-20 10:54:19 +03:00
parent 2e8e7f4c7f
commit 8ad7f1ecd3
3 changed files with 236 additions and 18 deletions
+2 -6
View File
@@ -10,6 +10,7 @@
#include "auth_3d.hpp"
#include "camera.hpp"
#include "effect.hpp"
#include "object.hpp"
#include "print.hpp"
#include "resource.h"
#include "shader_ft.hpp"
@@ -48,6 +49,7 @@ HOOK(int32_t, FASTCALL, data_init, 0x0000000140192FF0) {
camera_patch();
mdl::disp_manager_patch();
effect_patch();
object_patch();
render_manager_patch();
rob_patch();
sprite_patch();
@@ -84,10 +86,6 @@ HOOK(void, FASTCALL, _gl_state_get, 0x0000000140442DF0) {
gl_state_get();
}
HOOK(bool, FASTCALL, obj_mesh_vertex_buffer__load, 0x0000000140458280, obj_mesh_vertex_buffer* obj_vb, obj_mesh* mesh) {
return obj_vb->load(mesh);
}
HOOK(void, FASTCALL, rndr__Render__update_res, 0x00000001404A9480, rndr::Render* rend, bool set, int32_t base_downsample) {
rend->update_res(set, base_downsample);
}
@@ -228,8 +226,6 @@ void hook_funcs() {
INSTALL_HOOK(_gl_state_get);
INSTALL_HOOK(obj_mesh_vertex_buffer__load);
INSTALL_HOOK(rndr__Render__update_res);
INSTALL_HOOK(rndr__Render__init_tone_map_buffers);
INSTALL_HOOK(rndr__Render__init_render_buffers);