Add addon template and fast recompiling descriptions to wiki (#5388)

* Add addon template mention

* Add fast function recompiling mention

* Add LINKFUNC macro description

* Update coding-guidelines.md
This commit is contained in:
Dystopian 2017-07-27 09:26:24 +03:00 committed by Jo David
parent 8b7a862611
commit 20e50176e6
2 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,9 @@ class ACE_Settings {
};
```
#### 1.2.5 Addon template
Addon template is at [extras/blank](https://github.com/acemod/ACE3/tree/master/extras/blank){:target="_blank"} repo directory.
### 1.3 Stringtable
All text that shall be displayed to a user shall be defined in a `stringtable.xml` file for multi-language support.
@ -87,6 +90,7 @@ There also exists the `FUNC` family of Macros:
|`EFUNC(leg,face)` | `ace_leg_fnc_face` or the call trace wrapper for that function. |
|`DFUNC(face)` | `ace_balls_fnc_face` and will ALWAYS be the function global variable. |
|`DEFUNC(leg,face)` | `ace_leg_fnc_face` and will ALWAYS be the function global variable. |
|`LINKFUNC(face)` | `FUNC(face)` or "pass by reference" `{_this call FUNC(face)}` |
|`QFUNC(face)` | `"ace_balls_fnc_face"` |
|`QEFUNC(leg,face)` | `"ace_leg_fnc_face"` |
|`QQFUNC(face)` | `""ace_balls_fnc_face""` used inside `QUOTE` macros where double quotation is required. |
@ -96,6 +100,8 @@ The `FUNC` and `EFUNC` macros shall NOT be used inside `QUOTE` macros if the int
Using `FUNC` or `EFUNC` inside a `QUOTE` macro is fine if the intention is for it to be executed as a function.
`LINKFUNC` macro allows to recompile function used in event handler code when function cache is disabled. E.G. `player addEventHandler ["Fired", LINKFUNC(firedEH)];` will run updated code after each recompile.
#### 2.1.1 `FUNC` Macros, Call Tracing, and Non-ACE3/Anonymous Functions
ACE3 implements a basic call tracing system that can dump the call stack on errors or wherever you want. To do this the `FUNC` macros in debug mode will expand out to include metadata about the call including line numbers and files. This functionality is automatic with the use of calls via `FUNC` and `EFUNC`, but any calls to other functions need to use the following macros:

View File

@ -127,6 +127,8 @@ class CfgSettings {
#define DISABLE_COMPILE_CACHE
```
All functions with disabled caching can be recompiled with `[] call ACE_PREP_RECOMPILE;` command without mission restart. You can add a addAction/keybind/pfeh with this code and use it for fast recompiling.
### 7.2 Restrictions
Files must exist in the built PBOs for file patching to work. If you create a new file you must rebuild the PBO or Arma will not find it in your file paths.