Skip to content

Commit

Permalink
Convert rest of cfgFuncs to PATHTO_FNC macro (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored and commy2 committed Feb 16, 2019
1 parent d6cbc0f commit aff64ec
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 194 deletions.
56 changes: 11 additions & 45 deletions addons/diagnostic/CfgFunctions.hpp
Original file line number Diff line number Diff line change
@@ -1,53 +1,19 @@
// -----------------------------------------------------------------------------
// Automatically generated by 'functions_config.rb'
// DO NOT MANUALLY EDIT THIS FILE!
// DO NOT MANUALLY EDIT THIS FILE! ok
// -----------------------------------------------------------------------------

class CfgFunctions
{
class CBA
{
class Diagnostic
{
// CBA_fnc_debug
class debug
{
description = "General Purpose Debug Message Writer";
file = "\x\cba\addons\diagnostic\fnc_debug.sqf";
};
// CBA_fnc_error
class error
{
description = "Logs an error message to the RPT log.";
file = "\x\cba\addons\diagnostic\fnc_error.sqf";
};
// CBA_fnc_log
class log
{
description = "Logs a message to the RPT log.";
file = "\x\cba\addons\diagnostic\fnc_log.sqf";
};
// CBA_fnc_test
class test
{
description = "Runs unit tests for an addon or component.";
file = "\x\cba\addons\diagnostic\fnc_test.sqf";
};
class CfgFunctions {
class CBA {
class Diagnostic {
PATHTO_FNC(debug);
PATHTO_FNC(error);
PATHTO_FNC(log);
PATHTO_FNC(test);
};
class ProjectileTracking
{
// CBA_fnc_addUnitTrackProjectiles
class addUnitTrackProjectiles
{
description = "Adds projectile tracking to a given unit or vehicle.";
file = "\x\cba\addons\diagnostic\fnc_addUnitTrackProjectiles.sqf";
};
// CBA_fnc_removeUnitTrackProjectiles
class removeUnitTrackProjectiles
{
description = "Removes projectile tracking from a given unit or vehicle.";
file = "\x\cba\addons\diagnostic\fnc_removeUnitTrackProjectiles.sqf";
};
class ProjectileTracking {
PATHTO_FNC(addUnitTrackProjectiles);
PATHTO_FNC(removeUnitTrackProjectiles);
};
};
class A3 {
Expand Down
105 changes: 21 additions & 84 deletions addons/events/CfgFunctions.hpp
Original file line number Diff line number Diff line change
@@ -1,90 +1,27 @@
class CfgFunctions {
class CBA {
class Events {
class addBISEventHandler {
description = "Adds an event handler with arguments.";
file = "\x\cba\addons\events\fnc_addBISEventHandler.sqf";
};
class addPlayerEventHandler {
description = "Adds a player event handler.";
file = "\x\cba\addons\events\fnc_addPlayerEventHandler.sqf";
};
class removePlayerEventHandler {
description = "Removes a player event handler.";
file = "\x\cba\addons\events\fnc_removePlayerEventHandler.sqf";
};
class addDisplayHandler {
description = "Adds an action to the main display.";
file = "\x\cba\addons\events\fnc_addDisplayHandler.sqf";
};
class removeDisplayHandler {
description = "Removes an action from the main display.";
file = "\x\cba\addons\events\fnc_removeDisplayHandler.sqf";
};
class addKeyHandler {
description = "Adds an action to a keybind.";
file = "\x\cba\addons\events\fnc_addKeyHandler.sqf";
};
class addKeyHandlerFromConfig {
description = "Adds an action to a keybind from config.";
file = "\x\cba\addons\events\fnc_addKeyHandlerFromConfig.sqf";
};
class readKeyFromConfig {
description = "Reads key setting from config.";
file = "\x\cba\addons\events\fnc_readKeyFromConfig.sqf";
};
class changeKeyHandler {
description = "Changes the key of a key handler.";
file = "\x\cba\addons\events\fnc_changeKeyHandler.sqf";
};
class removeKeyHandler {
description = "Removes an action from a keybind.";
file = "\x\cba\addons\events\fnc_removeKeyHandler.sqf";
};
class addEventHandler {
description = "Registers an event handler for a specific CBA event.";
file = "\x\cba\addons\events\fnc_addEventHandler.sqf";
};
class addEventHandlerArgs {
description = "Registers an event handler for a specific CBA event with arguments.";
file = "\x\cba\addons\events\fnc_addEventHandlerArgs.sqf";
};
class removeEventHandler {
description = "Removes an event handler previously registered with CBA_fnc_addEventHandler.";
file = "\x\cba\addons\events\fnc_removeEventHandler.sqf";
};
class localEvent {
description = "Raises a CBA event on the local machine.";
file = "\x\cba\addons\events\fnc_localEvent.sqf";
};
class globalEvent {
description = "Raises a CBA event on all machines, including the local one.";
file = "\x\cba\addons\events\fnc_globalEvent.sqf";
};
class globalEventJIP {
description = "Raises a CBA event on all machines. Event is put on a stack that is executed on every future JIP machine. Stack can be overwritten by using the same JIP-Stack-ID.";
file = "\x\cba\addons\events\fnc_globalEventJIP.sqf";
};
class removeGlobalEventJIP {
description = "Removes a globalEventJIP ID. Optionaly will wait until an object is deleted.";
file = "\x\cba\addons\events\fnc_removeGlobalEventJIP.sqf";
};
class serverEvent {
description = "Raises a CBA event on the server machine.";
file = "\x\cba\addons\events\fnc_serverEvent.sqf";
};
class remoteEvent {
description = "Raises a CBA event on all machines, except the local one.";
file = "\x\cba\addons\events\fnc_remoteEvent.sqf";
};
class targetEvent {
description = "Raises a CBA event on all machines where this object or at least one of these objects are local.";
file = "\x\cba\addons\events\fnc_targetEvent.sqf";
};
class ownerEvent {
description = "Raises a CBA event on the target client ID's machine.";
file = "\x\cba\addons\events\fnc_ownerEvent.sqf";
};
PATHTO_FNC(addBISEventHandler);
PATHTO_FNC(addPlayerEventHandler);
PATHTO_FNC(removePlayerEventHandler);
PATHTO_FNC(addDisplayHandler);
PATHTO_FNC(removeDisplayHandler);
PATHTO_FNC(addKeyHandler);
PATHTO_FNC(addKeyHandlerFromConfig);
PATHTO_FNC(readKeyFromConfig);
PATHTO_FNC(changeKeyHandler);
PATHTO_FNC(removeKeyHandler);
PATHTO_FNC(addEventHandler);
PATHTO_FNC(addEventHandlerArgs);
PATHTO_FNC(removeEventHandler);
PATHTO_FNC(localEvent);
PATHTO_FNC(globalEvent);
PATHTO_FNC(globalEventJIP);
PATHTO_FNC(removeGlobalEventJIP);
PATHTO_FNC(serverEvent);
PATHTO_FNC(remoteEvent);
PATHTO_FNC(targetEvent);
PATHTO_FNC(ownerEvent);
PATHTO_FNC(addMarkerEventHandler);
PATHTO_FNC(removeMarkerEventHandler);
PATHTO_FNC(registerChatCommand);
Expand Down
5 changes: 3 additions & 2 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
*/

// Remove CfgFunction adding headers and disable SCRIPT macro (comment out to enable for debugging)
#define SKIP_FUNCTION_HEADER
#define SKIP_SCRIPT_NAME
#define SKIP_FUNCTION_HEADER // [Enable for release]
#define SKIP_SCRIPT_NAME // [Enable for release]
// #define RECOMPILE // [Disable for release]
27 changes: 4 additions & 23 deletions addons/modules/CfgFunctions.hpp
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
class CfgFunctions {
class CBA {
class Modules {
// CBA_fnc_getPosFromString
class getPosFromString {
description = "A function to get the position of an item passed as a string.";
file = "\x\cba\addons\modules\fnc_getPosFromString.sqf";
};

// CBA_fnc_moduleAttack
class moduleAttack {
description = "A function used to set a group to attack a position through a module.";
file = "\x\cba\addons\modules\fnc_moduleAttack.sqf";
};

// CBA_fnc_moduleDefend
class moduleDefend {
description = "A function used to set a group to defend a position through a module.";
file = "\x\cba\addons\modules\fnc_moduleDefend.sqf";
};

// CBA_fnc_modulePatrol
class modulePatrol {
description = "A function used to set a group to patrol a position through a module.";
file = "\x\cba\addons\modules\fnc_modulePatrol.sqf";
};
PATHTO_FNC(getPosFromString);
PATHTO_FNC(moduleAttack);
PATHTO_FNC(moduleDefend);
PATHTO_FNC(modulePatrol);
};
};
};
48 changes: 8 additions & 40 deletions addons/music/CfgFunctions.hpp
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
class CfgFunctions {
class CBA {
class Music {
// CBA_fnc_getMusicPath
class getMusicPath {
description = "Get the config path of given music class";
file = "\x\cba\addons\music\fnc_getMusicPath.sqf";
};
// CBA_fnc_getMusicData
class getMusicData {
description = "Get data attached to music class";
file = "\x\cba\addons\music\fnc_getMusicData.sqf";
};
// CBA_fnc_findMusic
class findMusic {
description = "Find music of specified type";
file = "\x\cba\addons\music\fnc_findMusic.sqf";
};
// CBA_fnc_compileMusic
class compileMusic {
description = "Find all music in game";
file = "\x\cba\addons\music\fnc_compileMusic.sqf";
};
// CBA_fnc_getMusicPlaying
class getMusicPlaying {
description = "Returns the data on currently playing music";
file = "\x\cba\addons\music\fnc_getMusicPlaying.sqf";
};
// CBA_fnc_isMusicPlaying
class isMusicPlaying {
description = "Returns if music is playing or not";
file = "\x\cba\addons\music\fnc_isMusicPlaying.sqf";
};
// CBA_fnc_playMusic
class playMusic {
description = "Play a given track";
file = "\x\cba\addons\music\fnc_playMusic.sqf";
};
// CBA_fnc_stopMusic
class stopMusic {
description = "Stops the music playing";
file = "\x\cba\addons\music\fnc_stopMusic.sqf";
};
PATHTO_FNC(getMusicPath);
PATHTO_FNC(getMusicData);
PATHTO_FNC(findMusic);
PATHTO_FNC(compileMusic);
PATHTO_FNC(getMusicPlaying);
PATHTO_FNC(isMusicPlaying);
PATHTO_FNC(playMusic);
PATHTO_FNC(stopMusic);
};
};
};

0 comments on commit aff64ec

Please sign in to comment.