Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev macro to quickly recompile functions #4699

Merged
merged 1 commit into from
Nov 23, 2016
Merged

Conversation

PabstMirror
Copy link
Contributor

Only effects dev enviroment

If you have DISABLE_COMPILE_CACHE macro set, this will add the code from xeh_prep.hpp to an array, which can easily be called mid mission.

So you can add a addAction/keybind/pfeh that runs
[] call ACE_PREP_RECOMPILE;
and all functions will be recompiled mid-mission.

Also adds #define LINKFUNC(x) which acts just like FUNC(x) normally, but when used with DISABLE_COMPILE_CACHE will become {_this call FUNC(x)}.
This acts sort of like "pass by reference", and will be updated with each recompile.

E.G. player addEventHandler ["Fired", LINKFUNC(firedEH)];
Will run updated code after each recompile.

No need to restart missions. Save code, recompile, test.

@PabstMirror PabstMirror added kind/enhancement Release Notes: **IMPROVED:** area/tools labels Nov 23, 2016
@PabstMirror PabstMirror added this to the Ongoing milestone Nov 23, 2016
Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

@jonpas jonpas mentioned this pull request Nov 23, 2016
@commy2
Copy link
Contributor

commy2 commented Nov 23, 2016

👍

@jonpas
Copy link
Member

jonpas commented Nov 25, 2016

This should be added to blank component in extras as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tools kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants