Skip to content

Commit

Permalink
Merge pull request #464 from CBATeam/precompile-display-load-functions
Browse files Browse the repository at this point in the history
precompile all display load functions
  • Loading branch information
Killswitch00 committed Aug 15, 2016
2 parents 90463a1 + 0881a91 commit 219d289
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 12 deletions.
4 changes: 2 additions & 2 deletions addons/events/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Extended_PostInit_EventHandlers {

class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(missionDisplayLoad)'));
};
class RscDisplayCurator {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_curatorDisplayLoad));
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(curatorDisplayLoad)'));
};
};
3 changes: 3 additions & 0 deletions addons/events/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
PREP(keyHandler);
PREP(keyHandlerDown);
PREP(keyHandlerUp);

PREP(missionDisplayLoad);
PREP(curatorDisplayLoad);
File renamed without changes.
File renamed without changes.
18 changes: 12 additions & 6 deletions addons/help/CfgEventhandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit));
Expand All @@ -13,15 +19,15 @@ class Extended_PostInit_EventHandlers {

class Extended_DisplayLoad_EventHandlers {
class RscDisplayMain {
CBA_helpVersion = QUOTE(_this call COMPILE_FILE(fnc_setVersionLine));
CBA_helpCredits = QUOTE(_this call COMPILE_FILE(fnc_setCreditsLine));
CBA_helpVersion = QUOTE(_this call (uiNamespace getVariable 'FUNC(setVersionLine)'));
CBA_helpCredits = QUOTE(_this call (uiNamespace getVariable 'FUNC(setCreditsLine)'));
};
class RscDisplayInterrupt {
CBA_helpVersion = QUOTE(_this call COMPILE_FILE(fnc_setVersionLine));
CBA_helpCredits = QUOTE(_this call COMPILE_FILE(fnc_setCreditsLine));
CBA_helpVersion = QUOTE(_this call (uiNamespace getVariable 'FUNC(setVersionLine)'));
CBA_helpCredits = QUOTE(_this call (uiNamespace getVariable 'FUNC(setCreditsLine)'));
};
class RscDisplayMPInterrupt {
CBA_helpVersion = QUOTE(_this call COMPILE_FILE(fnc_setVersionLine));
CBA_helpCredits = QUOTE(_this call COMPILE_FILE(fnc_setCreditsLine));
CBA_helpVersion = QUOTE(_this call (uiNamespace getVariable 'FUNC(setVersionLine)'));
CBA_helpCredits = QUOTE(_this call (uiNamespace getVariable 'FUNC(setCreditsLine)'));
};
};
4 changes: 4 additions & 0 deletions addons/help/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "script_component.hpp"

PREP(setVersionLine);
PREP(setCreditsLine);
8 changes: 7 additions & 1 deletion addons/keybinding/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
Expand All @@ -7,6 +13,6 @@ class Extended_PreInit_EventHandlers {

class Extended_DisplayLoad_EventHandlers {
class RscDisplayConfigure {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_configureDisplayLoad));
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(configureDisplayLoad)'));
};
};
3 changes: 3 additions & 0 deletions addons/keybinding/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "script_component.hpp"

PREP(configureDisplayLoad);
4 changes: 2 additions & 2 deletions addons/settings/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Extended_PostInit_EventHandlers {

class Extended_DisplayLoad_EventHandlers {
class RscDisplayGameOptions {
ADDON = QUOTE(if (isNil 'ADDON') then {_this call COMPILE_FILE(gui_initDisplay_disabled)} else {_this call COMPILE_FILE(gui_initDisplay)};);
ADDON = QUOTE(if (isNil 'ADDON') then {_this call (uiNamespace getVariable 'FUNC(gui_initDisplay_disabled)')} else {_this call (uiNamespace getVariable 'FUNC(gui_initDisplay)')};);
};
class Display3DEN {
ADDON = QUOTE(_this call COMPILE_FILE(init3DEN));
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(init3DEN)'));
};
};
4 changes: 4 additions & 0 deletions addons/settings/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"

PREP(gui_initDisplay);
PREP(gui_initDisplay_disabled);
PREP(init3DEN);
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/xeh/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Extended_Reloaded_EventHandlers {};
// display xeh
class Extended_DisplayLoad_EventHandlers {
class Display3DEN {
ADDON = QUOTE(call COMPILE_FILE(XEH_3DENDisplayLoad));
ADDON = QUOTE(call (uiNamespace getVariable 'FUNC(3DENDisplayLoad)'));
};
};
class Extended_DisplayUnload_EventHandlers {};
File renamed without changes.
2 changes: 2 additions & 0 deletions addons/xeh/fnc_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ with uiNamespace do {
SLX_XEH_COMPILE = compileFinal "compile preprocessFileLineNumbers _this"; //backwards comps
SLX_XEH_COMPILE_NEW = CBA_fnc_compileFunction; //backwards comp

PREP(3DENDisplayLoad);

// call PreStart events
{
private _eventFunc = "";
Expand Down

0 comments on commit 219d289

Please sign in to comment.