Page 24 of 56 FirstFirst ... 14 22 23 24 25 26 34 ... LastLast
Results 231 to 240 of 557

Thread: OpenSauce Halo CE SDK Update #2 (RC)

  1. #231
    I used to play Halo CE justin108's Avatar
    Join Date
    Jul 2008
    Posts
    106

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    Silent, that is very nice of you.

    However, I don't get the issue now with 1.09; version changer is out and using the exe i just put out to update sapp, wont all of your shit still work? I mean it should. 0 memory addys are shifted as its a modified 1.08exe and gameservers sees it as 1.09. The version check is removed from the 1.08exe allowing 1.09 to join.

    Unless I am mistaken that means OS should work? Ive been drinking so ill check it out tomorrow.

  2. #232
    El Durado :/
    Join Date
    Oct 2006
    Posts
    2,417

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    nah one thing is still broke...
    rec0's app.

  3. #233
    I used to play Halo CE justin108's Avatar
    Join Date
    Jul 2008
    Posts
    106

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    Im working on it as we speak, no guarantees though, im a noob that may be outta my scope. We shall see. xD

  4. #234
    El Durado :/
    Join Date
    Oct 2006
    Posts
    2,417

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    pssh everyone starts off somewhere
    and right now i'm a noob too

  5. #235
    Senior Member Hunter's Avatar
    Join Date
    Jan 2007
    Location
    Stoke, UK
    Posts
    2,968

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    Quote Originally Posted by Kornman00 View Post
    firefox ftw


    There is your fix, Mozilla Firefox!
    IE is epic fail... I hate it. Mainly because it is stupid and needs almost COMPLETELY different CSS code when making websites where as other web browsers do not...
    Microsoft think they are better than W3C...

  6. #236

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    IE cannot open my website

    I'm such a revolutionist...no basically it's some stupid script problem but idc.

  7. #237
    HA10 Limited's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    7,800

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    Quote Originally Posted by justin108 View Post
    Silent, that is very nice of you.

    However, I don't get the issue now with 1.09; version changer is out and using the exe i just put out to update sapp, wont all of your shit still work? I mean it should. 0 memory addys are shifted as its a modified 1.08exe and gameservers sees it as 1.09. The version check is removed from the 1.08exe allowing 1.09 to join.

    Unless I am mistaken that means OS should work? Ive been drinking so ill check it out tomorrow.
    The issue, is thats still 1.08 cleint, hense the IE fix and ram issue isnt included.

    In other words, we are at square one, apart from the 1.09 build number has been included into version changer, which would have taken me about 5 seconds to add to my OS project.

  8. #238
    Kid in the Hall Kornman00's Avatar
    Join Date
    Sep 2006
    Location
    ◕‿◕, ┌( ಠ_ಠ)┘
    Posts
    3,130

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    For the sake of fucks, I added a RAR with the source files whom were changed in order to accommodate major bug fixes (ie, in the settings and hud view) along with a readme detailing what exactly was changed for the curious.


    There appears to be confusion on how to create hs functions with parameters. Show to hopefully get FireScythe rolling or figuring out what he is doing wrong (or if maybe there is a problem even in the SDK), here is a small reference:

    When adding new functions there are a couple of source files which you'll need to modify:

    Game/ScriptLibrary.inl

    __SCRIPTLIBRARY_ENUMERATIONS region: defines the order in which the definitions are added to the yelo hs functions/globals. The order here MUST match the same order in __SCRIPTLIBRARY_DEFINITION_LISTING.

    __SCRIPTLIBRARY_DECLARATIONS region: Here is where you use the DECLARE_HS_* macros to actually declare the functions/globals you want to expose. Note that these DECLARE_HS_* macros can be placed in other source files (said macros are defined in ScriptLibrary.hpp).

    __SCRIPTLIBRARY_DEFINITIONS region: Here is where you use the HS definition macros to actually put a meaning to the declarations from earlier. Since the macro implementations are defined in ScriptLibrary.cpp, the definitions can only exist here and not in say GameEngine.cpp.

    __SCRIPTLIBRARY_DEFINITION_LISTING region: Here is where you define the yelo functions/globals which can be accessed in HS. The order here MUST match the same order in __SCRIPTLIBRARY_ENUMERATIONS.


    Game/ScriptLibrary.cpp

    InitializeLibrary function: here is where you initialize the hs definition with the script function's delegate. Structure is outlined for Debug/Release and User/Dedi specific constructs.


    How to define the script function's delegate

    Code:
    void* [FunctionName]Evaluate(void** arguments)
    {
     struct s_arguments {
      [arguments declarations]
     }* args = CAST_PTR(s_arguments*, arguments);
     [function logic]
     return NULL; // or if the function is suppose to return a value, cast to "void*"
    }
    Example:
    Code:
    bool VolumeTestPlayerTeam(int16 trigger_volume, int16 team_index)
    {
     return true;
    }
    void* VolumeTestPlayerTeamEvaluate(void** arguments)
    {
     struct s_arguments {
      int16 trigger_volume;
      int16 team_index;
     }* args = CAST_PTR(s_arguments*, arguments);
     bool result = VolumeTestPlayerTeam(args->trigger_volume, args->team_index);
     return CAST_PTR(void*, result);
    }
    NOTE: You should be struct layout smart if doing anything with more than one parameter.


    NOTE: If you don't understand why exactly a transexual type like "void*" is being used here, you probably shouldn't be dealing with code at this level. Get a low level engineer to join your team/project.

    And no, I'm not for hire. Unless you have deep pockets.



    I now realize that I didn't stick to one naming scheme: it's either parameter or argument. Semantics or not, should have stuck with one.

  9. #239
    Senior Member FireScythe's Avatar
    Join Date
    Sep 2006
    Location
    UK, England
    Posts
    321

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    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.

  10. #240
    Kid in the Hall Kornman00's Avatar
    Join Date
    Sep 2006
    Location
    ◕‿◕, ┌( ಠ_ಠ)┘
    Posts
    3,130

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    Funny thing is...all the functions are initialized before InitializeCreateScriptFunction is called...which sets up the function template code bytes (hs_eval_func_no_param/hs_eval_func_has_param) with some pointer values. I've only ran tests with everything initialized in that same part of the function, not after InitializeCreateScriptFunction. Ummm...try that. I've had functions with parameters run just fine like this ;x.

    Also, you're not consistant in your declarations vs definitions.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •