xray16 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -6
- package/xray16.d.ts +30852 -0
- package/types/index.d.ts +0 -55
- package/types/internal.d.ts +0 -6
- package/types/xr_ai/xr_action.d.ts +0 -1803
- package/types/xr_ai/xr_alife.d.ts +0 -1872
- package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
- package/types/xr_ai/xr_goap.d.ts +0 -1118
- package/types/xr_ai/xr_graph.d.ts +0 -135
- package/types/xr_ai/xr_memory.d.ts +0 -384
- package/types/xr_lib/xr_animation.d.ts +0 -252
- package/types/xr_lib/xr_bitwise.d.ts +0 -44
- package/types/xr_lib/xr_color.d.ts +0 -142
- package/types/xr_lib/xr_debug.d.ts +0 -183
- package/types/xr_lib/xr_dialog.d.ts +0 -132
- package/types/xr_lib/xr_flags.d.ts +0 -592
- package/types/xr_lib/xr_fs.d.ts +0 -617
- package/types/xr_lib/xr_game.d.ts +0 -362
- package/types/xr_lib/xr_hit.d.ts +0 -127
- package/types/xr_lib/xr_ini.d.ts +0 -475
- package/types/xr_lib/xr_level.d.ts +0 -797
- package/types/xr_lib/xr_luabind.d.ts +0 -90
- package/types/xr_lib/xr_map.d.ts +0 -194
- package/types/xr_lib/xr_math.d.ts +0 -871
- package/types/xr_lib/xr_multiplayer.d.ts +0 -1081
- package/types/xr_lib/xr_profile.d.ts +0 -272
- package/types/xr_lib/xr_properties.d.ts +0 -612
- package/types/xr_lib/xr_relation.d.ts +0 -231
- package/types/xr_lib/xr_render.d.ts +0 -167
- package/types/xr_lib/xr_save.d.ts +0 -835
- package/types/xr_lib/xr_sound.d.ts +0 -517
- package/types/xr_lib/xr_stats.ts +0 -51
- package/types/xr_lib/xr_task.d.ts +0 -390
- package/types/xr_lib/xr_time.d.ts +0 -177
- package/types/xr_lib/xr_type.d.ts +0 -70
- package/types/xr_object/client/xr_anomaly.d.ts +0 -70
- package/types/xr_object/client/xr_artefact.d.ts +0 -153
- package/types/xr_object/client/xr_client_object.d.ts +0 -207
- package/types/xr_object/client/xr_creature.d.ts +0 -243
- package/types/xr_object/client/xr_item.d.ts +0 -370
- package/types/xr_object/client/xr_level.d.ts +0 -755
- package/types/xr_object/client/xr_physic.d.ts +0 -644
- package/types/xr_object/client/xr_zone.d.ts +0 -85
- package/types/xr_object/script/xr_script_interface.d.ts +0 -1142
- package/types/xr_object/script/xr_script_object.d.ts +0 -5702
- package/types/xr_object/script/xr_script_trade.d.ts +0 -51
- package/types/xr_object/server/xr_server_object.d.ts +0 -1488
- package/types/xr_ui/xr_ui_asset.d.ts +0 -364
- package/types/xr_ui/xr_ui_core.d.ts +0 -426
- package/types/xr_ui/xr_ui_event.d.ts +0 -1449
- package/types/xr_ui/xr_ui_interface.d.ts +0 -2449
- package/types/xr_ui/xr_ui_menu.d.ts +0 -401
- package/types/xrf_plugin.d.ts +0 -111
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Script rules attached to a dialog phrase.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class CPhraseScript
|
|
6
|
-
* @customConstructor CPhraseScript
|
|
7
|
-
* @group xr_dialog
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Phrase scripts are evaluated by the dialog engine against the current actor/NPC speakers. Info portion checks use
|
|
11
|
-
* the actor info registry.
|
|
12
|
-
*/
|
|
13
|
-
export class CPhraseScript {
|
|
14
|
-
/**
|
|
15
|
-
* Run a script action after the phrase is spoken.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* In active two-speaker dialogs the function receives `(speaker, listener, dialog_id, phrase_id)`. In simpler
|
|
19
|
-
* dialog checks it receives `(speaker, dialog_id)`.
|
|
20
|
-
*
|
|
21
|
-
* @throws If the function name cannot be resolved.
|
|
22
|
-
*
|
|
23
|
-
* @param function_name - Script function name.
|
|
24
|
-
*/
|
|
25
|
-
public AddAction(function_name: string): void;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Disable an info portion when phrase actions run.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Applied after the phrase is accepted and its actions run.
|
|
32
|
-
*
|
|
33
|
-
* @param info_portion - Info portion id.
|
|
34
|
-
*/
|
|
35
|
-
public AddDisableInfo(info_portion: string): void;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Require an info portion to be absent before the phrase is available.
|
|
39
|
-
*
|
|
40
|
-
* @param info_portion - Info portion id.
|
|
41
|
-
*/
|
|
42
|
-
public AddDontHasInfo(info_portion: string): void;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Give an info portion when phrase actions run.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Applied after the phrase is accepted and its actions run.
|
|
49
|
-
*
|
|
50
|
-
* @param info_portion - Info portion id.
|
|
51
|
-
*/
|
|
52
|
-
public AddGiveInfo(info_portion: string): void;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Require an info portion before the phrase is available.
|
|
56
|
-
*
|
|
57
|
-
* @param info_portion - Info portion id.
|
|
58
|
-
*/
|
|
59
|
-
public AddHasInfo(info_portion: string): void;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Add a script predicate checked before the phrase is available.
|
|
63
|
-
*
|
|
64
|
-
* @remarks
|
|
65
|
-
* In active two-speaker dialogs the function receives `(speaker, listener, dialog_id, phrase_id, next_phrase_id)`.
|
|
66
|
-
* It should return `true` when the phrase may be shown.
|
|
67
|
-
*
|
|
68
|
-
* @throws If the function name cannot be resolved.
|
|
69
|
-
*
|
|
70
|
-
* @param function_name - Script function name.
|
|
71
|
-
*/
|
|
72
|
-
public AddPrecondition(function_name: string): void;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Use a script function to provide phrase text.
|
|
76
|
-
*
|
|
77
|
-
* @remarks
|
|
78
|
-
* The function is called when the dialog asks for phrase text. Use it for text that depends on the current speaker
|
|
79
|
-
* or dialog state.
|
|
80
|
-
*
|
|
81
|
-
* @throws If the function name cannot be resolved.
|
|
82
|
-
*
|
|
83
|
-
* @param function_name - Script function name.
|
|
84
|
-
*/
|
|
85
|
-
public SetScriptText(function_name: string): void;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Runtime phrase in a phrase dialog.
|
|
90
|
-
*
|
|
91
|
-
* @source C++ class CPhrase
|
|
92
|
-
* @customConstructor CPhrase
|
|
93
|
-
* @group xr_dialog
|
|
94
|
-
*
|
|
95
|
-
* @remarks
|
|
96
|
-
* Phrase instances are owned by the dialog graph. Script code usually configures them immediately after
|
|
97
|
-
* `CPhraseDialog.AddPhrase`.
|
|
98
|
-
*/
|
|
99
|
-
export class CPhrase {
|
|
100
|
-
/**
|
|
101
|
-
* @returns Script helper used to configure phrase conditions and actions.
|
|
102
|
-
*/
|
|
103
|
-
public GetPhraseScript(): CPhraseScript;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Phrase dialog built or extended from scripts.
|
|
108
|
-
*
|
|
109
|
-
* @source C++ class CPhraseDialog
|
|
110
|
-
* @customConstructor CPhraseDialog
|
|
111
|
-
* @group xr_dialog
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* A phrase dialog is a directed phrase graph. Phrase id `"0"` is the start phrase used by loaded XML dialogs.
|
|
115
|
-
*/
|
|
116
|
-
export class CPhraseDialog {
|
|
117
|
-
/**
|
|
118
|
-
* Add a phrase to the dialog tree.
|
|
119
|
-
*
|
|
120
|
-
* @remarks
|
|
121
|
-
* `prev_phrase_id` creates the edge from the previous phrase to the new one. Pass an empty string for a root phrase.
|
|
122
|
-
* Reusing an existing `phrase_id` returns the existing phrase and still links it from `prev_phrase_id`.
|
|
123
|
-
*
|
|
124
|
-
* @param text - Text or string table id.
|
|
125
|
-
* @param phrase_id - New phrase id.
|
|
126
|
-
* @param prev_phrase_id - Parent phrase id, or an empty string.
|
|
127
|
-
* @param goodwill_level - Goodwill value used when the engine orders available replies.
|
|
128
|
-
* @returns Created phrase.
|
|
129
|
-
*/
|
|
130
|
-
public AddPhrase(text: string, phrase_id: string, prev_phrase_id: string, goodwill_level: i32): CPhrase;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1,592 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* Mutable 8-bit flag mask.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class flags8
|
|
6
|
-
* @customConstructor flags8
|
|
7
|
-
* @group xr_flags
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Use `zero()`, `one()`, or `assign()` when you need an explicit initial state.
|
|
11
|
-
*/
|
|
12
|
-
export class flags8 {
|
|
13
|
-
/**
|
|
14
|
-
* Create a flag mask.
|
|
15
|
-
*/
|
|
16
|
-
public constructor();
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Replace this mask with `source & mask`.
|
|
20
|
-
*
|
|
21
|
-
* @param source - Source mask.
|
|
22
|
-
* @param mask - Bits to keep.
|
|
23
|
-
* @returns This mask.
|
|
24
|
-
*/
|
|
25
|
-
public and(source: flags8, mask: u8): flags8;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Apply bitwise AND to this mask.
|
|
29
|
-
*
|
|
30
|
-
* @param mask - Bits to keep.
|
|
31
|
-
* @returns This mask.
|
|
32
|
-
*/
|
|
33
|
-
public and(mask: u8): flags8;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Copy another flag mask.
|
|
37
|
-
*
|
|
38
|
-
* @param value - Source mask.
|
|
39
|
-
* @returns This mask.
|
|
40
|
-
*/
|
|
41
|
-
public assign(value: flags8): flags8;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Replace this mask with a raw value.
|
|
45
|
-
*
|
|
46
|
-
* @param value - Raw mask value.
|
|
47
|
-
* @returns This mask.
|
|
48
|
-
*/
|
|
49
|
-
public assign(value: u8): flags8;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Compare this mask with another mask.
|
|
53
|
-
*
|
|
54
|
-
* @param value - Mask to compare.
|
|
55
|
-
* @returns Whether masks are equal.
|
|
56
|
-
*/
|
|
57
|
-
public equal(value: Readonly<flags8>): boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Compare selected bits with another mask.
|
|
61
|
-
*
|
|
62
|
-
* @param value - Mask to compare.
|
|
63
|
-
* @param mask - Bits to compare.
|
|
64
|
-
* @returns Whether selected bits are equal.
|
|
65
|
-
*/
|
|
66
|
-
public equal(value: Readonly<flags8>, mask: u8): boolean;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Get raw mask value.
|
|
70
|
-
*
|
|
71
|
-
* @returns Raw mask value.
|
|
72
|
-
*/
|
|
73
|
-
public get(): u8;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Invert all bits in this mask.
|
|
77
|
-
*
|
|
78
|
-
* @returns This mask.
|
|
79
|
-
*/
|
|
80
|
-
public invert(): flags8;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Replace this mask with inverted source mask.
|
|
84
|
-
*
|
|
85
|
-
* @param value - Source mask.
|
|
86
|
-
* @returns This mask.
|
|
87
|
-
*/
|
|
88
|
-
public invert(value: flags8): flags8;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Toggle selected bits in this mask.
|
|
92
|
-
*
|
|
93
|
-
* @param value - Bits to toggle.
|
|
94
|
-
* @returns This mask.
|
|
95
|
-
*/
|
|
96
|
-
public invert(value: u8): flags8;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Check whether all selected bits are set in a source mask.
|
|
100
|
-
*
|
|
101
|
-
* @remarks
|
|
102
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
103
|
-
*
|
|
104
|
-
* @param value - Source mask.
|
|
105
|
-
* @param mask - Bits to test.
|
|
106
|
-
* @returns Whether all bits are set.
|
|
107
|
-
*/
|
|
108
|
-
public is(value: flags8, mask: u8): boolean;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Check whether all selected bits are set in this mask.
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
115
|
-
*
|
|
116
|
-
* @param mask - Bits to test.
|
|
117
|
-
* @returns Whether all bits are set.
|
|
118
|
-
*/
|
|
119
|
-
public is(mask: u8): boolean;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Check whether any selected bit is set in a source mask.
|
|
123
|
-
*
|
|
124
|
-
* @remarks
|
|
125
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
126
|
-
*
|
|
127
|
-
* @param value - Source mask.
|
|
128
|
-
* @param mask - Bits to test.
|
|
129
|
-
* @returns Whether any bit is set.
|
|
130
|
-
*/
|
|
131
|
-
public is_any(value: flags8, mask: u8): boolean;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Check whether any selected bit is set in this mask.
|
|
135
|
-
*
|
|
136
|
-
* @remarks
|
|
137
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
138
|
-
*
|
|
139
|
-
* @param mask - Bits to test.
|
|
140
|
-
* @returns Whether any bit is set.
|
|
141
|
-
*/
|
|
142
|
-
public is_any(mask: u8): boolean;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Set all bits.
|
|
146
|
-
*
|
|
147
|
-
* @remarks
|
|
148
|
-
* Sets all 8 bits to `1`.
|
|
149
|
-
*
|
|
150
|
-
* @returns This mask.
|
|
151
|
-
*/
|
|
152
|
-
public one(): flags8;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Replace this mask with `source | mask`.
|
|
156
|
-
*
|
|
157
|
-
* @param source - Source mask.
|
|
158
|
-
* @param mask - Bits to set.
|
|
159
|
-
* @returns This mask.
|
|
160
|
-
*/
|
|
161
|
-
public or(source: flags8, mask: u8): flags8;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Apply bitwise OR to this mask.
|
|
165
|
-
*
|
|
166
|
-
* @param mask - Bits to set.
|
|
167
|
-
* @returns This mask.
|
|
168
|
-
*/
|
|
169
|
-
public or(mask: u8): flags8;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Set or clear selected bits.
|
|
173
|
-
*
|
|
174
|
-
* @param mask - Bits to update.
|
|
175
|
-
* @param enabled - Whether bits should be set.
|
|
176
|
-
* @returns This mask.
|
|
177
|
-
*/
|
|
178
|
-
public set(mask: u8, enabled: boolean): flags8;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Test whether any selected bit is set.
|
|
182
|
-
*
|
|
183
|
-
* @remarks
|
|
184
|
-
* Equivalent to `is_any(mask)`.
|
|
185
|
-
*
|
|
186
|
-
* @param mask - Bits to test.
|
|
187
|
-
* @returns Whether any selected bit is set.
|
|
188
|
-
*/
|
|
189
|
-
public test(mask: u8): boolean;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Clear all bits.
|
|
193
|
-
*
|
|
194
|
-
* @returns This mask.
|
|
195
|
-
*/
|
|
196
|
-
public zero(): flags8;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Mutable 16-bit flag mask.
|
|
201
|
-
*
|
|
202
|
-
* @source C++ class flags16
|
|
203
|
-
* @customConstructor flags16
|
|
204
|
-
* @group xr_flags
|
|
205
|
-
*
|
|
206
|
-
* @remarks
|
|
207
|
-
* Use `zero()`, `one()`, or `assign()` when you need an explicit initial state.
|
|
208
|
-
*/
|
|
209
|
-
export class flags16 {
|
|
210
|
-
/**
|
|
211
|
-
* Create a flag mask.
|
|
212
|
-
*/
|
|
213
|
-
public constructor();
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Replace this mask with `source & mask`.
|
|
217
|
-
*
|
|
218
|
-
* @param source - Source mask.
|
|
219
|
-
* @param mask - Bits to keep.
|
|
220
|
-
* @returns This mask.
|
|
221
|
-
*/
|
|
222
|
-
public and(source: flags16, mask: u16): flags16;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Apply bitwise AND to this mask.
|
|
226
|
-
*
|
|
227
|
-
* @param mask - Bits to keep.
|
|
228
|
-
* @returns This mask.
|
|
229
|
-
*/
|
|
230
|
-
public and(mask: u16): flags16;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Copy another flag mask.
|
|
234
|
-
*
|
|
235
|
-
* @param value - Source mask.
|
|
236
|
-
* @returns This mask.
|
|
237
|
-
*/
|
|
238
|
-
public assign(value: flags16): flags16;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Replace this mask with a raw value.
|
|
242
|
-
*
|
|
243
|
-
* @param value - Raw mask value.
|
|
244
|
-
* @returns This mask.
|
|
245
|
-
*/
|
|
246
|
-
public assign(value: u16): flags16;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Compare this mask with another mask.
|
|
250
|
-
*
|
|
251
|
-
* @param value - Mask to compare.
|
|
252
|
-
* @returns Whether masks are equal.
|
|
253
|
-
*/
|
|
254
|
-
public equal(value: Readonly<flags16>): boolean;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Compare selected bits with another mask.
|
|
258
|
-
*
|
|
259
|
-
* @param value - Mask to compare.
|
|
260
|
-
* @param mask - Bits to compare.
|
|
261
|
-
* @returns Whether selected bits are equal.
|
|
262
|
-
*/
|
|
263
|
-
public equal(value: Readonly<flags16>, mask: u16): boolean;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Get raw mask value.
|
|
267
|
-
*
|
|
268
|
-
* @returns Raw mask value.
|
|
269
|
-
*/
|
|
270
|
-
public get(): u16;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Invert all bits in this mask.
|
|
274
|
-
*
|
|
275
|
-
* @returns This mask.
|
|
276
|
-
*/
|
|
277
|
-
public invert(): flags16;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Replace this mask with inverted source mask.
|
|
281
|
-
*
|
|
282
|
-
* @param value - Source mask.
|
|
283
|
-
* @returns This mask.
|
|
284
|
-
*/
|
|
285
|
-
public invert(value: flags16): flags16;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Toggle selected bits in this mask.
|
|
289
|
-
*
|
|
290
|
-
* @param value - Bits to toggle.
|
|
291
|
-
* @returns This mask.
|
|
292
|
-
*/
|
|
293
|
-
public invert(value: u16): flags16;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Check whether all selected bits are set in a source mask.
|
|
297
|
-
*
|
|
298
|
-
* @remarks
|
|
299
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
300
|
-
*
|
|
301
|
-
* @param value - Source mask.
|
|
302
|
-
* @param mask - Bits to test.
|
|
303
|
-
* @returns Whether all bits are set.
|
|
304
|
-
*/
|
|
305
|
-
public is(value: flags16, mask: u16): boolean;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Check whether all selected bits are set in this mask.
|
|
309
|
-
*
|
|
310
|
-
* @remarks
|
|
311
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
312
|
-
*
|
|
313
|
-
* @param mask - Bits to test.
|
|
314
|
-
* @returns Whether all bits are set.
|
|
315
|
-
*/
|
|
316
|
-
public is(mask: u16): boolean;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Check whether any selected bit is set in a source mask.
|
|
320
|
-
*
|
|
321
|
-
* @remarks
|
|
322
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
323
|
-
*
|
|
324
|
-
* @param value - Source mask.
|
|
325
|
-
* @param mask - Bits to test.
|
|
326
|
-
* @returns Whether any bit is set.
|
|
327
|
-
*/
|
|
328
|
-
public is_any(value: flags16, mask: u16): boolean;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Check whether any selected bit is set in this mask.
|
|
332
|
-
*
|
|
333
|
-
* @remarks
|
|
334
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
335
|
-
*
|
|
336
|
-
* @param mask - Bits to test.
|
|
337
|
-
* @returns Whether any bit is set.
|
|
338
|
-
*/
|
|
339
|
-
public is_any(mask: u16): boolean;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Set all bits.
|
|
343
|
-
*
|
|
344
|
-
* @remarks
|
|
345
|
-
* Sets all 16 bits to `1`.
|
|
346
|
-
*
|
|
347
|
-
* @returns This mask.
|
|
348
|
-
*/
|
|
349
|
-
public one(): flags16;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Replace this mask with `source | mask`.
|
|
353
|
-
*
|
|
354
|
-
* @param source - Source mask.
|
|
355
|
-
* @param mask - Bits to set.
|
|
356
|
-
* @returns This mask.
|
|
357
|
-
*/
|
|
358
|
-
public or(source: flags16, mask: u16): flags16;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Apply bitwise OR to this mask.
|
|
362
|
-
*
|
|
363
|
-
* @param mask - Bits to set.
|
|
364
|
-
* @returns This mask.
|
|
365
|
-
*/
|
|
366
|
-
public or(mask: u16): flags16;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Set or clear selected bits.
|
|
370
|
-
*
|
|
371
|
-
* @param mask - Bits to update.
|
|
372
|
-
* @param enabled - Whether bits should be set.
|
|
373
|
-
* @returns This mask.
|
|
374
|
-
*/
|
|
375
|
-
public set(mask: u16, enabled: boolean): flags16;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Test whether any selected bit is set.
|
|
379
|
-
*
|
|
380
|
-
* @remarks
|
|
381
|
-
* Equivalent to `is_any(mask)`.
|
|
382
|
-
*
|
|
383
|
-
* @param mask - Bits to test.
|
|
384
|
-
* @returns Whether any selected bit is set.
|
|
385
|
-
*/
|
|
386
|
-
public test(mask: u16): boolean;
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
* Clear all bits.
|
|
390
|
-
*
|
|
391
|
-
* @returns This mask.
|
|
392
|
-
*/
|
|
393
|
-
public zero(): flags16;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Mutable 32-bit flag mask.
|
|
398
|
-
*
|
|
399
|
-
* @source C++ class flags32
|
|
400
|
-
* @customConstructor flags32
|
|
401
|
-
* @group xr_flags
|
|
402
|
-
*
|
|
403
|
-
* @remarks
|
|
404
|
-
* Use `zero()`, `one()`, or `assign()` when you need an explicit initial state.
|
|
405
|
-
*/
|
|
406
|
-
export class flags32 {
|
|
407
|
-
/**
|
|
408
|
-
* Create a flag mask.
|
|
409
|
-
*/
|
|
410
|
-
public constructor();
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Replace this mask with `source & mask`.
|
|
414
|
-
*
|
|
415
|
-
* @param source - Source mask.
|
|
416
|
-
* @param mask - Bits to keep.
|
|
417
|
-
* @returns This mask.
|
|
418
|
-
*/
|
|
419
|
-
public and(source: flags32, mask: u32): flags32;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Apply bitwise AND to this mask.
|
|
423
|
-
*
|
|
424
|
-
* @param mask - Bits to keep.
|
|
425
|
-
* @returns This mask.
|
|
426
|
-
*/
|
|
427
|
-
public and(mask: u32): flags32;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Copy another flag mask.
|
|
431
|
-
*
|
|
432
|
-
* @param value - Source mask.
|
|
433
|
-
* @returns This mask.
|
|
434
|
-
*/
|
|
435
|
-
public assign(value: flags32): flags32;
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Replace this mask with a raw value.
|
|
439
|
-
*
|
|
440
|
-
* @param value - Raw mask value.
|
|
441
|
-
* @returns This mask.
|
|
442
|
-
*/
|
|
443
|
-
public assign(value: u32): flags32;
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* Compare this mask with another mask.
|
|
447
|
-
*
|
|
448
|
-
* @param value - Mask to compare.
|
|
449
|
-
* @returns Whether masks are equal.
|
|
450
|
-
*/
|
|
451
|
-
public equal(value: Readonly<flags32>): boolean;
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Compare selected bits with another mask.
|
|
455
|
-
*
|
|
456
|
-
* @param value - Mask to compare.
|
|
457
|
-
* @param mask - Bits to compare.
|
|
458
|
-
* @returns Whether selected bits are equal.
|
|
459
|
-
*/
|
|
460
|
-
public equal(value: Readonly<flags32>, mask: u32): boolean;
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Get raw mask value.
|
|
464
|
-
*
|
|
465
|
-
* @returns Raw mask value.
|
|
466
|
-
*/
|
|
467
|
-
public get(): u32;
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Invert all bits in this mask.
|
|
471
|
-
*
|
|
472
|
-
* @returns This mask.
|
|
473
|
-
*/
|
|
474
|
-
public invert(): flags32;
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Replace this mask with inverted source mask.
|
|
478
|
-
*
|
|
479
|
-
* @param value - Source mask.
|
|
480
|
-
* @returns This mask.
|
|
481
|
-
*/
|
|
482
|
-
public invert(value: flags32): flags32;
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Toggle selected bits in this mask.
|
|
486
|
-
*
|
|
487
|
-
* @param value - Bits to toggle.
|
|
488
|
-
* @returns This mask.
|
|
489
|
-
*/
|
|
490
|
-
public invert(value: u32): flags32;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Check whether all selected bits are set in a source mask.
|
|
494
|
-
*
|
|
495
|
-
* @remarks
|
|
496
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
497
|
-
*
|
|
498
|
-
* @param value - Source mask.
|
|
499
|
-
* @param mask - Bits to test.
|
|
500
|
-
* @returns Whether all bits are set.
|
|
501
|
-
*/
|
|
502
|
-
public is(value: flags32, mask: u32): boolean;
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Check whether all selected bits are set in this mask.
|
|
506
|
-
*
|
|
507
|
-
* @remarks
|
|
508
|
-
* This is stricter than `is_any()` and `test()`: every bit from `mask` must be present.
|
|
509
|
-
*
|
|
510
|
-
* @param mask - Bits to test.
|
|
511
|
-
* @returns Whether all bits are set.
|
|
512
|
-
*/
|
|
513
|
-
public is(mask: u32): boolean;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Check whether any selected bit is set in a source mask.
|
|
517
|
-
*
|
|
518
|
-
* @remarks
|
|
519
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
520
|
-
*
|
|
521
|
-
* @param value - Source mask.
|
|
522
|
-
* @param mask - Bits to test.
|
|
523
|
-
* @returns Whether any bit is set.
|
|
524
|
-
*/
|
|
525
|
-
public is_any(value: flags32, mask: u32): boolean;
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* Check whether any selected bit is set in this mask.
|
|
529
|
-
*
|
|
530
|
-
* @remarks
|
|
531
|
-
* Use this for overlap checks. For an all-bits check, use `is()`.
|
|
532
|
-
*
|
|
533
|
-
* @param mask - Bits to test.
|
|
534
|
-
* @returns Whether any bit is set.
|
|
535
|
-
*/
|
|
536
|
-
public is_any(mask: u32): boolean;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Set all bits.
|
|
540
|
-
*
|
|
541
|
-
* @remarks
|
|
542
|
-
* Sets all 32 bits to `1`.
|
|
543
|
-
*
|
|
544
|
-
* @returns This mask.
|
|
545
|
-
*/
|
|
546
|
-
public one(): flags32;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* Replace this mask with `source | mask`.
|
|
550
|
-
*
|
|
551
|
-
* @param source - Source mask.
|
|
552
|
-
* @param mask - Bits to set.
|
|
553
|
-
* @returns This mask.
|
|
554
|
-
*/
|
|
555
|
-
public or(source: flags32, mask: u32): flags32;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Apply bitwise OR to this mask.
|
|
559
|
-
*
|
|
560
|
-
* @param mask - Bits to set.
|
|
561
|
-
* @returns This mask.
|
|
562
|
-
*/
|
|
563
|
-
public or(mask: u32): flags32;
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* Set or clear selected bits.
|
|
567
|
-
*
|
|
568
|
-
* @param mask - Bits to update.
|
|
569
|
-
* @param enabled - Whether bits should be set.
|
|
570
|
-
* @returns This mask.
|
|
571
|
-
*/
|
|
572
|
-
public set(mask: u32, enabled: boolean): flags32;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Test whether any selected bit is set.
|
|
576
|
-
*
|
|
577
|
-
* @remarks
|
|
578
|
-
* Equivalent to `is_any(mask)`.
|
|
579
|
-
*
|
|
580
|
-
* @param mask - Bits to test.
|
|
581
|
-
* @returns Whether any selected bit is set.
|
|
582
|
-
*/
|
|
583
|
-
public test(mask: u32): boolean;
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Clear all bits.
|
|
587
|
-
*
|
|
588
|
-
* @returns This mask.
|
|
589
|
-
*/
|
|
590
|
-
public zero(): flags32;
|
|
591
|
-
}
|
|
592
|
-
}
|