Ok, so under __SCRIPTLIBRARY_ENUMERATIONS
Code:////////////////////////////////////////////////////////////////////////// // Functions enum hs_function_enumeration : int16 { //_hs_function_null, _hs_function_volume_test_player_team, _hs_function_volume_test_player_team_all, _hs_function_player_team_teleport, _hs_function_player_team_players, //PostProcessing////////////// _hs_function_pp_load, _hs_function_pp_unload, _hs_function_pp_set_effect_active, //PostProcessing////////////// // debug functions #ifdef API_DEBUG _hs_function_test_networking, #endif k_hs_function_enumeration_count, };
under __SCRIPTLIBRARY_DECLARATIONS
Code:////////////////////////////////////////////////////////////////////////// // Functions //DECLARE_HS_FUNCTION(null); DECLARE_HS_FUNCTION_WITH_PARAMS(volume_test_player_team); DECLARE_HS_FUNCTION_WITH_PARAMS(volume_test_player_team_all); DECLARE_HS_FUNCTION_WITH_PARAMS(player_team_teleport); DECLARE_HS_FUNCTION_WITH_PARAMS(player_team_players); //PostProcessing////////////// DECLARE_HS_FUNCTION(pp_load); DECLARE_HS_FUNCTION(pp_unload); DECLARE_HS_FUNCTION(pp_set_effect_active); //PostProcessing////////////// // debug functions #ifdef API_DEBUG DECLARE_HS_FUNCTION(test_networking); #endif
under __SCRIPTLIBRARY_DEFINITIONS
Code:////////////////////////////////////////////////////////////////////////// // Functions //HS_FUNCTION(null, void, "", ""); HS_FUNCTION_WITH_PARAMS(volume_test_player_team, bool, "returns true if any players of the specified team are within the specified volume.", "<volume> <team-index>", 2, HS_TYPE(trigger_volume), HS_TYPE(short) ); HS_FUNCTION_WITH_PARAMS(volume_test_player_team_all, bool, "returns true if all players of the specified team are within the specified volume.", "<volume> <team-index>", 2, HS_TYPE(trigger_volume), HS_TYPE(short) ); HS_FUNCTION_WITH_PARAMS(player_team_teleport, void, "moves the specified team to the specified flag.", "<team-index> <cutscene-flag>", 1, HS_TYPE(short), HS_TYPE(cutscene_flag) ); HS_FUNCTION_WITH_PARAMS(player_team_players, object_list, "returns a list of players on the specified team", "<team-index>", 1, HS_TYPE(short) ); //PostProcessing////////////// HS_FUNCTION(pp_load, void, "loads post processing"); HS_FUNCTION(pp_unload, void, "unloads post processing"); HS_FUNCTION_WITH_PARAMS(pp_set_effect_active, void, "instantly set an effect to on or off", "<effect-index>", 1, HS_TYPE(short) ); //PostProcessing////////////// // debug functions #ifdef API_DEBUG HS_FUNCTION(test_networking, void, ""); #endif
and under __SCRIPTLIBRARY_DEFINITION_LISTING
Code:////////////////////////////////////////////////////////////////////////// // Functions static hs_function_definition* hs_yelo_functions[] = { //&GET_HS_FUNCTION(null), &GET_HS_FUNCTION(volume_test_player_team), &GET_HS_FUNCTION(volume_test_player_team_all), &GET_HS_FUNCTION(player_team_teleport), &GET_HS_FUNCTION(player_team_players), //PostProcessing////////////// &GET_HS_FUNCTION(pp_load), &GET_HS_FUNCTION(pp_unload), &GET_HS_FUNCTION(pp_set_effect_active), //PostProcessing////////////// // debug functions #ifdef API_DEBUG &GET_HS_FUNCTION(test_networking), #endif };
then InitializeLibrary and the function delegate
Code:void InitializeLibrary() { //GET_HS_FUNCTION(null).evaluate = (hs_evaluate_proc)GET_FUNC_VPTR(HS_NULL_EVALUTE); // Come back later please...under construction NullifyScriptFunctionWithParams( GET_HS_FUNCTION(volume_test_player_team) ); NullifyScriptFunctionWithParams( GET_HS_FUNCTION(volume_test_player_team_all) ); NullifyScriptFunctionWithParams( GET_HS_FUNCTION(player_team_teleport) ); NullifyScriptFunctionWithParams( GET_HS_FUNCTION(player_team_players) ); #ifdef API_DEBUG #ifndef YELO_NO_NETWORK InitializeScriptFunction(Enums::_hs_function_test_networking, MessageDeltas::TestToNetwork); #else NullifyScriptFunction( GET_HS_FUNCTION(test_networking) ); #endif #endif MemoryUpgradesInitialize(); InitializeCreateScriptFunction(); InitializeScriptFunction(Enums::_hs_function_pp_load, Yelo::PostProcessing::HS_Load); InitializeScriptFunction(Enums::_hs_function_pp_unload, Yelo::PostProcessing::HS_Unload); InitializeScriptFunctionWithParams(Enums::_hs_function_pp_set_effect_active, Yelo::PostProcessing::HS_SetEffectActiveEvaluate); AllowFullAccess(true); } void* HS_SetEffectActiveEvaluate(void** arguments) { struct s_arguments { int16 index; }* args = CAST_PTR(s_arguments*, arguments); return NULL; }
Set up like this, pp_unload and pp_load work as expected, but pp_set_effect_active exceptions without reaching HS_SetEffectActiveEvaluate.
Bookmarks