script_macros.hpp

Defines macros imported to other functions

Summary
script_macros.hppDefines macros imported to other functions
Macros
PREFIX
COMPONENT_NAME
ADDONPREFIX_COMPONENT
VERSION
VERSION_STR
VERSION_AR
VERSION_REQUIRED
LOGUsed for logging messages to the extension (ocap-ext log file).
SYSCHATUsed for debug purposes to send a string to all clients with interfaces.
SHOULDSAVEEVENTSUsed to determine if events should currently be saved based on OCAP_recorder_recording and <OCAP_recorder_startTime>.
BOOLForces a true/false return of input.
ARR2Resolves arguments to array, used for entries to LOG that requires array input.

Macros

PREFIX

#define PREFIX OCAP

COMPONENT_NAME

#define COMPONENT_NAME QUOTE(PREFIX COMPONENT_BEAUTIFIED)

VERSION

#define VERSION 2.0

VERSION_STR

#define VERSION_STR 2.0.0

VERSION_AR

#define VERSION_AR 2,0,0

VERSION_REQUIRED

#define VERSION_REQUIRED 2.10

LOG

#define OCAPEXTLOG(_args) [":LOG:", _args] call EFUNC(extension,sendData)

Used for logging messages to the extension (ocap-ext log file).

SYSCHAT

#define SYSCHAT remoteExec ["systemChat", [0, -2] select isDedicated]

Used for debug purposes to send a string to all clients with interfaces.

SHOULDSAVEEVENTS

#define SHOULDSAVEEVENTS (
   (missionNamespace getVariable [QGVAR(recording), false]) && missionNamespace getVariable [QGVAR(startTime), -1] -1
)

Used to determine if events should currently be saved based on OCAP_recorder_recording and <OCAP_recorder_startTime>.

BOOL

#define BOOL(_cond) ([0,1] select (_cond))

Forces a true/false return of input.

ARR2

#define ARR2(_arg1,
_arg2) [_arg1, _arg2]

Resolves arguments to array, used for entries to LOG that requires array input.

#define PREFIX OCAP
#define COMPONENT_NAME QUOTE(PREFIX COMPONENT_BEAUTIFIED)
#define COMPONENT main
#define VERSION 2.0
#define VERSION_STR 2.0.0
#define VERSION_AR 2,0,0
#define VERSION_REQUIRED 2.10
#define OCAPEXTLOG(_args) [":LOG:", _args] call EFUNC(extension,sendData)
Used for logging messages to the extension (ocap-ext log file).
#define SYSCHAT remoteExec ["systemChat", [0, -2] select isDedicated]
Used for debug purposes to send a string to all clients with interfaces.
#define SHOULDSAVEEVENTS (
   (missionNamespace getVariable [QGVAR(recording), false]) && missionNamespace getVariable [QGVAR(startTime), -1] -1
)
Used to determine if events should currently be saved based on OCAP_recorder_recording and OCAP_recorder_startTime.
Global variable that represents whether or not recording is active [Bool]
#define BOOL(_cond) ([0,1] select (_cond))
Forces a true/false return of input.
#define ARR2(_arg1,
_arg2) [_arg1, _arg2]
Resolves arguments to array, used for entries to LOG that requires array input.
Close