Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
proto.c
Go to the documentation of this file.
1
/*
2
Function/method modifiers:
3
proto - prototyping of internal function (C++ side)
4
native - native call convention of internal function (C++ side)
5
volatile - internal function that may call back to script (hint for
6
compiler that context need to be saved on stack)
7
private - function may not be called from script
8
event - hint for tools that the function should be exposed as
9
Entity script event.
10
11
Variable modifiers:
12
owned - modifier for returing internal functions. Tells to script-VM,
13
that returning variable (string or array) must not be released
14
out - modifier for function parameters. It tells that variable will
15
be changed by function call (used mainly by internal functions)
16
inout - modifier for function parameters. It tells that variable will
17
be used and then changed by function call (used mainly by internal functions)
18
19
const - constants. May not be modified.
20
reference - hint for tools (Material editor), that the variable may be used
21
as parameter in material
22
\code
23
//some example "reference" variables for use in material editor
24
reference float g_testVariable1;
25
reference float g_testVariable2;
26
reference float g_testVariable3;
27
28
class TestClass
29
{
30
//some example "reference" variables for use in material editor
31
reference float testVar1;
32
reference float testVar2;
33
reference float testVar3;
34
}
35
\endcode
36
*/
37
38
/*===================================================================*/
39
/* Enforce engine API */
40
/*===================================================================*/
41
42
//----------------------------------------------
43
int
VectorToRGBA
(
vector
vec,
float
h)
44
{
45
float
x,y,z;
46
int
r,g,b,a;
47
48
x = vec[0];
49
y = vec[1];
50
z = vec[2];
51
52
x = x * 127.0 + 128.0;
53
y = y * 127.0 + 128.0;
54
z = z * 127.0 + 128.0;
55
h = h * 255.0;
56
57
a = (
int
)h << 24;
58
r = (
int
)x << 16;
59
g = (
int
)y << 8;
60
b = z;
61
62
return
r | g | b | a;
63
}
64
65
66
//-----------------------------------------------------------------
67
proto
int
ARGB
(
int
a,
int
r,
int
g,
int
b);
68
69
//-----------------------------------------------------------------
71
proto
int
ARGBF
(
float
fa,
float
fr,
float
fg,
float
fb);
72
73
//-----------------------------------------------------------------
74
proto
int
ABGR
(
int
a,
int
r,
int
g,
int
b);
75
76
//-----------------------------------------------------------------
77
proto
int
ABGRF
(
float
fa,
float
fr,
float
fg,
float
fb);
78
79
//-----------------------------------------------------------------
80
int
AWHITE
(
int
a)
81
{
82
return
a << 24 | 0xffffff;
83
}
int
Definition
int.c:13
vector
Definition
vector.c:13
ABGRF
proto int ABGRF(float fa, float fr, float fg, float fb)
ARGBF
proto int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
VectorToRGBA
int VectorToRGBA(vector vec, float h)
Definition
proto.c:43
ARGB
proto int ARGB(int a, int r, int g, int b)
ABGR
proto int ABGR(int a, int r, int g, int b)
AWHITE
int AWHITE(int a)
Definition
proto.c:80
scripts
Core
proto
proto.c
Generated by
1.17.0