Skip to content

Commit

Permalink
Bump REFramework (#40)
Browse files Browse the repository at this point in the history
* Bump REFramework version to v1.5.2.

* Update hooks with new signature.
  • Loading branch information
TheTedder authored Oct 2, 2023
1 parent 3100396 commit d840c81
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace REFix {
extern const REF::API::Field* camera_param_field;
extern const REF::API::Field* field_of_view_field;

int pre_update_pitch_yaw(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys) {
int pre_update_pitch_yaw(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr) {
REF::API::ManagedObject* const camera_param = camera_param_field->get_data<REF::API::ManagedObject*>(argv[1]);
const float fov = *(float*)field_of_view_field->get_data_raw(camera_param);
float* input = (float*)&argv[2];
Expand All @@ -15,7 +15,7 @@ namespace REFix {
return REFRAMEWORK_HOOK_CALL_ORIGINAL;
}

int pre_add_rank_point_direct(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys)
int pre_add_rank_point_direct(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr)
{
const RankPointType rankType = *(RankPointType*)&argv[3];

Expand All @@ -29,7 +29,7 @@ namespace REFix {
return REFRAMEWORK_HOOK_SKIP_ORIGINAL;
}

int pre_set_interval_level(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys)
int pre_set_interval_level(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr)
{
int32_t* level = (int32_t*)&argv[2];
*level = 0;
Expand Down
6 changes: 3 additions & 3 deletions Hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "REFix.h"

namespace REFix {
int pre_update_pitch_yaw(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys);
int pre_add_rank_point_direct(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys);
int pre_set_interval_level(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys);
int pre_update_pitch_yaw(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr);
int pre_add_rank_point_direct(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr);
int pre_set_interval_level(int argc, void** argv, REFrameworkTypeDefinitionHandle* arg_tys, unsigned long long ret_addr);
}
2 changes: 1 addition & 1 deletion REFix.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace REF = reframework;

namespace REFix {
static void post_hook_null(void** ret_val, REFrameworkTypeDefinitionHandle ret_ty) {}
static void post_hook_null(void** ret_val, REFrameworkTypeDefinitionHandle ret_ty, unsigned long long ret_addr) {}
}

extern "C" __declspec(dllexport) bool reframework_plugin_initialize(const REFrameworkPluginInitializeParam* param);
Expand Down
2 changes: 1 addition & 1 deletion REFramework

0 comments on commit d840c81

Please sign in to comment.