forked from project-ethea/After_the_Storm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase-math.cfg
143 lines (130 loc) · 3.09 KB
/
base-math.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#textdomain wesnoth-After_the_Storm
#########################
# ARITHMETIC OPERATIONS #
#########################
# l_value = l_value + r_value;
#define VARIABLE_ADD VAR_ID RVALUE
[set_variable]
name={VAR_ID}
add={RVALUE}
[/set_variable]
#enddef
# l_value = l_value - r_value;
#define VARIABLE_MINUS VAR_ID RVALUE
[set_variable]
name={VAR_ID}
sub={RVALUE}
[/set_variable]
#enddef
# l_value = l_value * r_value;
#define VARIABLE_MULTIPLY VAR_ID RVALUE
[set_variable]
name={VAR_ID}
multiply={RVALUE}
[/set_variable]
#enddef
# l_value = l_value / r_value;
#define VARIABLE_DIVIDE VAR_ID RVALUE
[set_variable]
name={VAR_ID}
divide={RVALUE}
[/set_variable]
#enddef
# l_value = l_value % r_value;
#define VARIABLE_MODULO VAR_ID RVALUE
[set_variable]
name={VAR_ID}
modulo={RVALUE}
[/set_variable]
#enddef
# Short aliases of primitives
#define VARIABLE_MIN VAR_ID RVALUE
{VARIABLE_MINUS {VAR_ID} {RVALUE} }
#enddef
#define VARIABLE_MUL VAR_ID RVALUE
{VARIABLE_MULTIPLY {VAR_ID} {RVALUE} }
#enddef
#define VARIABLE_DIV VAR_ID RVALUE
{VARIABLE_DIVIDE {VAR_ID} {RVALUE} }
#enddef
#define VARIABLE_MOD VAR_ID RVALUE
{VARIABLE_MODULO {VAR_ID} {RVALUE} }
#enddef
# l_value = -l_value;
#define VARIABLE_NEG VAR_ID
[set_variable]
name={VAR_ID}
multiply=-1
[/set_variable]
#enddef
# ++l_value;
#define VARIABLE_INC VAR_ID
[set_variable]
name={VAR_ID}
add=1
[/set_variable]
#enddef
# --l_value;
#define VARIABLE_DEC VAR_ID
[set_variable]
name={VAR_ID}
sub=1
[/set_variable]
#enddef
#########################
# COMPARISON OPERATIONS #
#########################
# ( l_value == r_value )
#define VARIABLE_NUMERICAL_EQUALS VAR_ID RVALUE
[variable]
name={VAR_ID}
numerical_equals={RVALUE}
[/variable]
#enddef
# ( l_value != r_value )
#define VARIABLE_NUMERICAL_NOT_EQUALS VAR_ID RVALUE
[variable]
name={VAR_ID}
numerical_not_equals={RVALUE}
[/variable]
#enddef
# ( l_value < r_value )
#define VARIABLE_NUMERICAL_LESS_THAN VAR_ID RVALUE
[variable]
name={VAR_ID}
less_than={RVALUE}
[/variable]
#enddef
# ( l_value > r_value )
#define VARIABLE_NUMERICAL_GREATER_THAN VAR_ID RVALUE
[variable]
name={VAR_ID}
greater_than={RVALUE}
[/variable]
#enddef
# ( l_value <= r_value )
#define VARIABLE_NUMERICAL_LESS_THAN_OR_EQUAL VAR_ID RVALUE
[variable]
name={VAR_ID}
less_than_equal_to={RVALUE}
[/variable]
#enddef
# ( l_value >= r_value )
#define VARIABLE_NUMERICAL_GREATER_THAN_OR_EQUAL VAR_ID RVALUE
[variable]
name={VAR_ID}
greater_than_equal_to={RVALUE}
[/variable]
#enddef
# ( l_value >= left_r_value && l_value <= right_r_value )
#define VARIABLE_NUMERICAL_IN_RANGE VAR_ID LEFT RIGHT
[variable]
name={VAR_ID}
greater_than_equal_to={LEFT}
[/variable]
[variable]
name={VAR_ID}
less_than_equal_to={RIGHT}
[/variable]
#enddef
# kate: indent-mode normal; encoding utf-8; space-indent on;