fleethub-core 1.11.4 → 1.11.6
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/node/fleethub_core.d.ts +363 -363
- package/node/fleethub_core.js +505 -453
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +107 -107
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +363 -363
- package/pkg/fleethub_core_bg.js +505 -453
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +107 -107
package/node/fleethub_core.js
CHANGED
|
@@ -21,6 +21,18 @@ function addHeapObject(obj) {
|
|
|
21
21
|
return idx;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
function dropObject(idx) {
|
|
25
|
+
if (idx < 132) return;
|
|
26
|
+
heap[idx] = heap_next;
|
|
27
|
+
heap_next = idx;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function takeObject(idx) {
|
|
31
|
+
const ret = getObject(idx);
|
|
32
|
+
dropObject(idx);
|
|
33
|
+
return ret;
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
25
37
|
|
|
26
38
|
cachedTextDecoder.decode();
|
|
@@ -35,21 +47,10 @@ function getUint8Memory0() {
|
|
|
35
47
|
}
|
|
36
48
|
|
|
37
49
|
function getStringFromWasm0(ptr, len) {
|
|
50
|
+
ptr = ptr >>> 0;
|
|
38
51
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
52
|
}
|
|
40
53
|
|
|
41
|
-
function dropObject(idx) {
|
|
42
|
-
if (idx < 132) return;
|
|
43
|
-
heap[idx] = heap_next;
|
|
44
|
-
heap_next = idx;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function takeObject(idx) {
|
|
48
|
-
const ret = getObject(idx);
|
|
49
|
-
dropObject(idx);
|
|
50
|
-
return ret;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
54
|
let WASM_VECTOR_LEN = 0;
|
|
54
55
|
|
|
55
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -71,14 +72,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
71
72
|
|
|
72
73
|
if (realloc === undefined) {
|
|
73
74
|
const buf = cachedTextEncoder.encode(arg);
|
|
74
|
-
const ptr = malloc(buf.length);
|
|
75
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
75
76
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
76
77
|
WASM_VECTOR_LEN = buf.length;
|
|
77
78
|
return ptr;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
let len = arg.length;
|
|
81
|
-
let ptr = malloc(len);
|
|
82
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
82
83
|
|
|
83
84
|
const mem = getUint8Memory0();
|
|
84
85
|
|
|
@@ -94,7 +95,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
94
95
|
if (offset !== 0) {
|
|
95
96
|
arg = arg.slice(offset);
|
|
96
97
|
}
|
|
97
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
98
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
98
99
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
99
100
|
const ret = encodeString(arg, view);
|
|
100
101
|
|
|
@@ -118,22 +119,38 @@ function getInt32Memory0() {
|
|
|
118
119
|
return cachedInt32Memory0;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (cachedUint16Memory0 === null || cachedUint16Memory0.byteLength === 0) {
|
|
125
|
-
cachedUint16Memory0 = new Uint16Array(wasm.memory.buffer);
|
|
126
|
-
}
|
|
127
|
-
return cachedUint16Memory0;
|
|
122
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
123
|
+
ptr = ptr >>> 0;
|
|
124
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
128
125
|
}
|
|
129
126
|
|
|
130
|
-
function
|
|
131
|
-
const ptr = malloc(arg.length *
|
|
132
|
-
|
|
127
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
128
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
129
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
133
130
|
WASM_VECTOR_LEN = arg.length;
|
|
134
131
|
return ptr;
|
|
135
132
|
}
|
|
136
133
|
|
|
134
|
+
let cachedUint32Memory0 = null;
|
|
135
|
+
|
|
136
|
+
function getUint32Memory0() {
|
|
137
|
+
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
|
|
138
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
139
|
+
}
|
|
140
|
+
return cachedUint32Memory0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
144
|
+
ptr = ptr >>> 0;
|
|
145
|
+
const mem = getUint32Memory0();
|
|
146
|
+
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
|
|
147
|
+
const result = [];
|
|
148
|
+
for (let i = 0; i < slice.length; i++) {
|
|
149
|
+
result.push(takeObject(slice[i]));
|
|
150
|
+
}
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
|
|
137
154
|
function _assertClass(instance, klass) {
|
|
138
155
|
if (!(instance instanceof klass)) {
|
|
139
156
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -150,28 +167,32 @@ function getFloat64Memory0() {
|
|
|
150
167
|
return cachedFloat64Memory0;
|
|
151
168
|
}
|
|
152
169
|
|
|
153
|
-
let
|
|
170
|
+
let cachedUint16Memory0 = null;
|
|
154
171
|
|
|
155
|
-
function
|
|
156
|
-
if (
|
|
157
|
-
|
|
172
|
+
function getUint16Memory0() {
|
|
173
|
+
if (cachedUint16Memory0 === null || cachedUint16Memory0.byteLength === 0) {
|
|
174
|
+
cachedUint16Memory0 = new Uint16Array(wasm.memory.buffer);
|
|
158
175
|
}
|
|
159
|
-
return
|
|
176
|
+
return cachedUint16Memory0;
|
|
160
177
|
}
|
|
161
178
|
|
|
162
|
-
function
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
result.push(takeObject(slice[i]));
|
|
168
|
-
}
|
|
169
|
-
return result;
|
|
179
|
+
function passArray16ToWasm0(arg, malloc) {
|
|
180
|
+
const ptr = malloc(arg.length * 2, 2) >>> 0;
|
|
181
|
+
getUint16Memory0().set(arg, ptr / 2);
|
|
182
|
+
WASM_VECTOR_LEN = arg.length;
|
|
183
|
+
return ptr;
|
|
170
184
|
}
|
|
171
185
|
|
|
172
186
|
function getArrayU16FromWasm0(ptr, len) {
|
|
187
|
+
ptr = ptr >>> 0;
|
|
173
188
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
174
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
*/
|
|
192
|
+
module.exports.set_panic_hook = function() {
|
|
193
|
+
wasm.set_panic_hook();
|
|
194
|
+
};
|
|
195
|
+
|
|
175
196
|
/**
|
|
176
197
|
* @param {ShipConditions} value
|
|
177
198
|
* @returns {ShipConditions}
|
|
@@ -181,23 +202,6 @@ module.exports.parse_ship_conditions = function(value) {
|
|
|
181
202
|
return takeObject(ret);
|
|
182
203
|
};
|
|
183
204
|
|
|
184
|
-
/**
|
|
185
|
-
*/
|
|
186
|
-
module.exports.set_panic_hook = function() {
|
|
187
|
-
wasm.set_panic_hook();
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
191
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
195
|
-
const ptr = malloc(arg.length * 1);
|
|
196
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
197
|
-
WASM_VECTOR_LEN = arg.length;
|
|
198
|
-
return ptr;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
205
|
function handleError(f, args) {
|
|
202
206
|
try {
|
|
203
207
|
return f.apply(this, args);
|
|
@@ -206,21 +210,22 @@ function handleError(f, args) {
|
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
|
|
209
|
-
const AirSquadronFinalization = new FinalizationRegistry(ptr => wasm.__wbg_airsquadron_free(ptr));
|
|
213
|
+
const AirSquadronFinalization = new FinalizationRegistry(ptr => wasm.__wbg_airsquadron_free(ptr >>> 0));
|
|
210
214
|
/**
|
|
211
215
|
*/
|
|
212
216
|
class AirSquadron {
|
|
213
217
|
|
|
214
218
|
static __wrap(ptr) {
|
|
219
|
+
ptr = ptr >>> 0;
|
|
215
220
|
const obj = Object.create(AirSquadron.prototype);
|
|
216
|
-
obj.
|
|
217
|
-
AirSquadronFinalization.register(obj, obj.
|
|
221
|
+
obj.__wbg_ptr = ptr;
|
|
222
|
+
AirSquadronFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
218
223
|
return obj;
|
|
219
224
|
}
|
|
220
225
|
|
|
221
226
|
__destroy_into_raw() {
|
|
222
|
-
const ptr = this.
|
|
223
|
-
this.
|
|
227
|
+
const ptr = this.__wbg_ptr;
|
|
228
|
+
this.__wbg_ptr = 0;
|
|
224
229
|
AirSquadronFinalization.unregister(this);
|
|
225
230
|
return ptr;
|
|
226
231
|
}
|
|
@@ -233,15 +238,19 @@ class AirSquadron {
|
|
|
233
238
|
* @returns {string}
|
|
234
239
|
*/
|
|
235
240
|
get id() {
|
|
241
|
+
let deferred1_0;
|
|
242
|
+
let deferred1_1;
|
|
236
243
|
try {
|
|
237
244
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
238
|
-
wasm.__wbg_get_airsquadron_id(retptr, this.
|
|
245
|
+
wasm.__wbg_get_airsquadron_id(retptr, this.__wbg_ptr);
|
|
239
246
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
240
247
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
248
|
+
deferred1_0 = r0;
|
|
249
|
+
deferred1_1 = r1;
|
|
241
250
|
return getStringFromWasm0(r0, r1);
|
|
242
251
|
} finally {
|
|
243
252
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
244
|
-
wasm.__wbindgen_free(
|
|
253
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
245
254
|
}
|
|
246
255
|
}
|
|
247
256
|
/**
|
|
@@ -250,33 +259,33 @@ class AirSquadron {
|
|
|
250
259
|
set id(arg0) {
|
|
251
260
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
261
|
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
wasm.__wbg_set_airsquadron_id(this.
|
|
262
|
+
wasm.__wbg_set_airsquadron_id(this.__wbg_ptr, ptr0, len0);
|
|
254
263
|
}
|
|
255
264
|
/**
|
|
256
265
|
* @returns {bigint}
|
|
257
266
|
*/
|
|
258
267
|
get hash() {
|
|
259
|
-
const ret = wasm.__wbg_get_airsquadron_hash(this.
|
|
268
|
+
const ret = wasm.__wbg_get_airsquadron_hash(this.__wbg_ptr);
|
|
260
269
|
return BigInt.asUintN(64, ret);
|
|
261
270
|
}
|
|
262
271
|
/**
|
|
263
272
|
* @param {bigint} arg0
|
|
264
273
|
*/
|
|
265
274
|
set hash(arg0) {
|
|
266
|
-
wasm.__wbg_set_airsquadron_hash(this.
|
|
275
|
+
wasm.__wbg_set_airsquadron_hash(this.__wbg_ptr, arg0);
|
|
267
276
|
}
|
|
268
277
|
/**
|
|
269
278
|
* @returns {AirSquadronMode}
|
|
270
279
|
*/
|
|
271
280
|
get mode() {
|
|
272
|
-
const ret = wasm.__wbg_get_airsquadron_mode(this.
|
|
281
|
+
const ret = wasm.__wbg_get_airsquadron_mode(this.__wbg_ptr);
|
|
273
282
|
return takeObject(ret);
|
|
274
283
|
}
|
|
275
284
|
/**
|
|
276
285
|
* @param {AirSquadronMode} arg0
|
|
277
286
|
*/
|
|
278
287
|
set mode(arg0) {
|
|
279
|
-
wasm.__wbg_set_airsquadron_mode(this.
|
|
288
|
+
wasm.__wbg_set_airsquadron_mode(this.__wbg_ptr, addHeapObject(arg0));
|
|
280
289
|
}
|
|
281
290
|
/**
|
|
282
291
|
* @param {string} key
|
|
@@ -285,7 +294,7 @@ class AirSquadron {
|
|
|
285
294
|
get_gear(key) {
|
|
286
295
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
296
|
const len0 = WASM_VECTOR_LEN;
|
|
288
|
-
const ret = wasm.airsquadron_get_gear(this.
|
|
297
|
+
const ret = wasm.airsquadron_get_gear(this.__wbg_ptr, ptr0, len0);
|
|
289
298
|
return ret === 0 ? undefined : Gear.__wrap(ret);
|
|
290
299
|
}
|
|
291
300
|
/**
|
|
@@ -295,7 +304,7 @@ class AirSquadron {
|
|
|
295
304
|
get_slot_size(index) {
|
|
296
305
|
try {
|
|
297
306
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
298
|
-
wasm.airsquadron_get_slot_size(retptr, this.
|
|
307
|
+
wasm.airsquadron_get_slot_size(retptr, this.__wbg_ptr, index);
|
|
299
308
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
300
309
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
301
310
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -314,7 +323,7 @@ class AirSquadron {
|
|
|
314
323
|
get_max_slot_size(index) {
|
|
315
324
|
try {
|
|
316
325
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
317
|
-
wasm.airsquadron_get_max_slot_size(retptr, this.
|
|
326
|
+
wasm.airsquadron_get_max_slot_size(retptr, this.__wbg_ptr, index);
|
|
318
327
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
319
328
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
320
329
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -330,14 +339,14 @@ class AirSquadron {
|
|
|
330
339
|
* @returns {number}
|
|
331
340
|
*/
|
|
332
341
|
fighter_power() {
|
|
333
|
-
const ret = wasm.airsquadron_fighter_power(this.
|
|
342
|
+
const ret = wasm.airsquadron_fighter_power(this.__wbg_ptr);
|
|
334
343
|
return ret;
|
|
335
344
|
}
|
|
336
345
|
/**
|
|
337
346
|
* @returns {number}
|
|
338
347
|
*/
|
|
339
348
|
interception_power() {
|
|
340
|
-
const ret = wasm.airsquadron_interception_power(this.
|
|
349
|
+
const ret = wasm.airsquadron_interception_power(this.__wbg_ptr);
|
|
341
350
|
return ret;
|
|
342
351
|
}
|
|
343
352
|
/**
|
|
@@ -345,27 +354,28 @@ class AirSquadron {
|
|
|
345
354
|
* @returns {number}
|
|
346
355
|
*/
|
|
347
356
|
radius() {
|
|
348
|
-
const ret = wasm.airsquadron_radius(this.
|
|
357
|
+
const ret = wasm.airsquadron_radius(this.__wbg_ptr);
|
|
349
358
|
return ret;
|
|
350
359
|
}
|
|
351
360
|
}
|
|
352
361
|
module.exports.AirSquadron = AirSquadron;
|
|
353
362
|
|
|
354
|
-
const AnalyzerFinalization = new FinalizationRegistry(ptr => wasm.__wbg_analyzer_free(ptr));
|
|
363
|
+
const AnalyzerFinalization = new FinalizationRegistry(ptr => wasm.__wbg_analyzer_free(ptr >>> 0));
|
|
355
364
|
/**
|
|
356
365
|
*/
|
|
357
366
|
class Analyzer {
|
|
358
367
|
|
|
359
368
|
static __wrap(ptr) {
|
|
369
|
+
ptr = ptr >>> 0;
|
|
360
370
|
const obj = Object.create(Analyzer.prototype);
|
|
361
|
-
obj.
|
|
362
|
-
AnalyzerFinalization.register(obj, obj.
|
|
371
|
+
obj.__wbg_ptr = ptr;
|
|
372
|
+
AnalyzerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
363
373
|
return obj;
|
|
364
374
|
}
|
|
365
375
|
|
|
366
376
|
__destroy_into_raw() {
|
|
367
|
-
const ptr = this.
|
|
368
|
-
this.
|
|
377
|
+
const ptr = this.__wbg_ptr;
|
|
378
|
+
this.__wbg_ptr = 0;
|
|
369
379
|
AnalyzerFinalization.unregister(this);
|
|
370
380
|
return ptr;
|
|
371
381
|
}
|
|
@@ -384,7 +394,7 @@ class Analyzer {
|
|
|
384
394
|
analyze_ship_attack(config, left, right, attacker_is_left) {
|
|
385
395
|
_assertClass(left, Ship);
|
|
386
396
|
_assertClass(right, Ship);
|
|
387
|
-
const ret = wasm.analyzer_analyze_ship_attack(this.
|
|
397
|
+
const ret = wasm.analyzer_analyze_ship_attack(this.__wbg_ptr, addHeapObject(config), left.__wbg_ptr, right.__wbg_ptr, attacker_is_left);
|
|
388
398
|
return takeObject(ret);
|
|
389
399
|
}
|
|
390
400
|
/**
|
|
@@ -400,7 +410,7 @@ class Analyzer {
|
|
|
400
410
|
_assertClass(left_ship, Ship);
|
|
401
411
|
_assertClass(right_comp, Comp);
|
|
402
412
|
_assertClass(right_ship, Ship);
|
|
403
|
-
const ret = wasm.analyzer_analyze_node_attack(this.
|
|
413
|
+
const ret = wasm.analyzer_analyze_node_attack(this.__wbg_ptr, addHeapObject(config), left_comp.__wbg_ptr, left_ship.__wbg_ptr, right_comp.__wbg_ptr, right_ship.__wbg_ptr);
|
|
404
414
|
return takeObject(ret);
|
|
405
415
|
}
|
|
406
416
|
/**
|
|
@@ -410,7 +420,7 @@ class Analyzer {
|
|
|
410
420
|
*/
|
|
411
421
|
analyze_comp(comp, config) {
|
|
412
422
|
_assertClass(comp, Comp);
|
|
413
|
-
const ret = wasm.analyzer_analyze_comp(this.
|
|
423
|
+
const ret = wasm.analyzer_analyze_comp(this.__wbg_ptr, comp.__wbg_ptr, addHeapObject(config));
|
|
414
424
|
return takeObject(ret);
|
|
415
425
|
}
|
|
416
426
|
/**
|
|
@@ -425,7 +435,7 @@ class Analyzer {
|
|
|
425
435
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
426
436
|
_assertClass(player_comp, Comp);
|
|
427
437
|
_assertClass(enemy_comp, Comp);
|
|
428
|
-
wasm.analyzer_simulate_support_shelling(retptr, this.
|
|
438
|
+
wasm.analyzer_simulate_support_shelling(retptr, this.__wbg_ptr, player_comp.__wbg_ptr, enemy_comp.__wbg_ptr, addHeapObject(config), times);
|
|
429
439
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
430
440
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
431
441
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -440,21 +450,22 @@ class Analyzer {
|
|
|
440
450
|
}
|
|
441
451
|
module.exports.Analyzer = Analyzer;
|
|
442
452
|
|
|
443
|
-
const CompFinalization = new FinalizationRegistry(ptr => wasm.__wbg_comp_free(ptr));
|
|
453
|
+
const CompFinalization = new FinalizationRegistry(ptr => wasm.__wbg_comp_free(ptr >>> 0));
|
|
444
454
|
/**
|
|
445
455
|
*/
|
|
446
456
|
class Comp {
|
|
447
457
|
|
|
448
458
|
static __wrap(ptr) {
|
|
459
|
+
ptr = ptr >>> 0;
|
|
449
460
|
const obj = Object.create(Comp.prototype);
|
|
450
|
-
obj.
|
|
451
|
-
CompFinalization.register(obj, obj.
|
|
461
|
+
obj.__wbg_ptr = ptr;
|
|
462
|
+
CompFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
452
463
|
return obj;
|
|
453
464
|
}
|
|
454
465
|
|
|
455
466
|
__destroy_into_raw() {
|
|
456
|
-
const ptr = this.
|
|
457
|
-
this.
|
|
467
|
+
const ptr = this.__wbg_ptr;
|
|
468
|
+
this.__wbg_ptr = 0;
|
|
458
469
|
CompFinalization.unregister(this);
|
|
459
470
|
return ptr;
|
|
460
471
|
}
|
|
@@ -467,21 +478,21 @@ class Comp {
|
|
|
467
478
|
* @returns {OrgType}
|
|
468
479
|
*/
|
|
469
480
|
get org_type() {
|
|
470
|
-
const ret = wasm.__wbg_get_comp_org_type(this.
|
|
481
|
+
const ret = wasm.__wbg_get_comp_org_type(this.__wbg_ptr);
|
|
471
482
|
return takeObject(ret);
|
|
472
483
|
}
|
|
473
484
|
/**
|
|
474
485
|
* @returns {number}
|
|
475
486
|
*/
|
|
476
487
|
get hq_level() {
|
|
477
|
-
const ret = wasm.__wbg_get_comp_hq_level(this.
|
|
488
|
+
const ret = wasm.__wbg_get_comp_hq_level(this.__wbg_ptr);
|
|
478
489
|
return ret;
|
|
479
490
|
}
|
|
480
491
|
/**
|
|
481
492
|
* @returns {Fleet}
|
|
482
493
|
*/
|
|
483
494
|
get main() {
|
|
484
|
-
const ret = wasm.__wbg_get_comp_main(this.
|
|
495
|
+
const ret = wasm.__wbg_get_comp_main(this.__wbg_ptr);
|
|
485
496
|
return Fleet.__wrap(ret);
|
|
486
497
|
}
|
|
487
498
|
/**
|
|
@@ -490,13 +501,13 @@ class Comp {
|
|
|
490
501
|
set main(arg0) {
|
|
491
502
|
_assertClass(arg0, Fleet);
|
|
492
503
|
var ptr0 = arg0.__destroy_into_raw();
|
|
493
|
-
wasm.__wbg_set_comp_main(this.
|
|
504
|
+
wasm.__wbg_set_comp_main(this.__wbg_ptr, ptr0);
|
|
494
505
|
}
|
|
495
506
|
/**
|
|
496
507
|
* @returns {Fleet | undefined}
|
|
497
508
|
*/
|
|
498
509
|
get escort() {
|
|
499
|
-
const ret = wasm.__wbg_get_comp_escort(this.
|
|
510
|
+
const ret = wasm.__wbg_get_comp_escort(this.__wbg_ptr);
|
|
500
511
|
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
501
512
|
}
|
|
502
513
|
/**
|
|
@@ -508,13 +519,13 @@ class Comp {
|
|
|
508
519
|
_assertClass(arg0, Fleet);
|
|
509
520
|
ptr0 = arg0.__destroy_into_raw();
|
|
510
521
|
}
|
|
511
|
-
wasm.__wbg_set_comp_escort(this.
|
|
522
|
+
wasm.__wbg_set_comp_escort(this.__wbg_ptr, ptr0);
|
|
512
523
|
}
|
|
513
524
|
/**
|
|
514
525
|
* @returns {Fleet | undefined}
|
|
515
526
|
*/
|
|
516
527
|
get route_sup() {
|
|
517
|
-
const ret = wasm.__wbg_get_comp_route_sup(this.
|
|
528
|
+
const ret = wasm.__wbg_get_comp_route_sup(this.__wbg_ptr);
|
|
518
529
|
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
519
530
|
}
|
|
520
531
|
/**
|
|
@@ -526,13 +537,13 @@ class Comp {
|
|
|
526
537
|
_assertClass(arg0, Fleet);
|
|
527
538
|
ptr0 = arg0.__destroy_into_raw();
|
|
528
539
|
}
|
|
529
|
-
wasm.__wbg_set_comp_route_sup(this.
|
|
540
|
+
wasm.__wbg_set_comp_route_sup(this.__wbg_ptr, ptr0);
|
|
530
541
|
}
|
|
531
542
|
/**
|
|
532
543
|
* @returns {Fleet | undefined}
|
|
533
544
|
*/
|
|
534
545
|
get boss_sup() {
|
|
535
|
-
const ret = wasm.__wbg_get_comp_boss_sup(this.
|
|
546
|
+
const ret = wasm.__wbg_get_comp_boss_sup(this.__wbg_ptr);
|
|
536
547
|
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
537
548
|
}
|
|
538
549
|
/**
|
|
@@ -544,34 +555,34 @@ class Comp {
|
|
|
544
555
|
_assertClass(arg0, Fleet);
|
|
545
556
|
ptr0 = arg0.__destroy_into_raw();
|
|
546
557
|
}
|
|
547
|
-
wasm.__wbg_set_comp_boss_sup(this.
|
|
558
|
+
wasm.__wbg_set_comp_boss_sup(this.__wbg_ptr, ptr0);
|
|
548
559
|
}
|
|
549
560
|
/**
|
|
550
561
|
* @returns {Side}
|
|
551
562
|
*/
|
|
552
563
|
side() {
|
|
553
|
-
const ret = wasm.comp_side(this.
|
|
564
|
+
const ret = wasm.comp_side(this.__wbg_ptr);
|
|
554
565
|
return takeObject(ret);
|
|
555
566
|
}
|
|
556
567
|
/**
|
|
557
568
|
* @returns {boolean}
|
|
558
569
|
*/
|
|
559
570
|
is_combined() {
|
|
560
|
-
const ret = wasm.comp_is_combined(this.
|
|
571
|
+
const ret = wasm.comp_is_combined(this.__wbg_ptr);
|
|
561
572
|
return ret !== 0;
|
|
562
573
|
}
|
|
563
574
|
/**
|
|
564
575
|
* @returns {boolean}
|
|
565
576
|
*/
|
|
566
577
|
is_player() {
|
|
567
|
-
const ret = wasm.comp_is_player(this.
|
|
578
|
+
const ret = wasm.comp_is_player(this.__wbg_ptr);
|
|
568
579
|
return ret !== 0;
|
|
569
580
|
}
|
|
570
581
|
/**
|
|
571
582
|
* @returns {boolean}
|
|
572
583
|
*/
|
|
573
584
|
is_enemy() {
|
|
574
|
-
const ret = wasm.comp_is_enemy(this.
|
|
585
|
+
const ret = wasm.comp_is_enemy(this.__wbg_ptr);
|
|
575
586
|
return ret !== 0;
|
|
576
587
|
}
|
|
577
588
|
/**
|
|
@@ -581,7 +592,7 @@ class Comp {
|
|
|
581
592
|
has_ship_eid(id) {
|
|
582
593
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
583
594
|
const len0 = WASM_VECTOR_LEN;
|
|
584
|
-
const ret = wasm.comp_has_ship_eid(this.
|
|
595
|
+
const ret = wasm.comp_has_ship_eid(this.__wbg_ptr, ptr0, len0);
|
|
585
596
|
return ret !== 0;
|
|
586
597
|
}
|
|
587
598
|
/**
|
|
@@ -590,15 +601,15 @@ class Comp {
|
|
|
590
601
|
first_ship_id() {
|
|
591
602
|
try {
|
|
592
603
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
593
|
-
wasm.comp_first_ship_id(retptr, this.
|
|
604
|
+
wasm.comp_first_ship_id(retptr, this.__wbg_ptr);
|
|
594
605
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
595
606
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
596
|
-
let
|
|
607
|
+
let v1;
|
|
597
608
|
if (r0 !== 0) {
|
|
598
|
-
|
|
609
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
599
610
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
600
611
|
}
|
|
601
|
-
return
|
|
612
|
+
return v1;
|
|
602
613
|
} finally {
|
|
603
614
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
604
615
|
}
|
|
@@ -607,14 +618,14 @@ class Comp {
|
|
|
607
618
|
* @returns {boolean}
|
|
608
619
|
*/
|
|
609
620
|
has_route_sup() {
|
|
610
|
-
const ret = wasm.comp_has_route_sup(this.
|
|
621
|
+
const ret = wasm.comp_has_route_sup(this.__wbg_ptr);
|
|
611
622
|
return ret !== 0;
|
|
612
623
|
}
|
|
613
624
|
/**
|
|
614
625
|
* @returns {CompMeta}
|
|
615
626
|
*/
|
|
616
627
|
meta() {
|
|
617
|
-
const ret = wasm.comp_meta(this.
|
|
628
|
+
const ret = wasm.comp_meta(this.__wbg_ptr);
|
|
618
629
|
return takeObject(ret);
|
|
619
630
|
}
|
|
620
631
|
/**
|
|
@@ -624,15 +635,15 @@ class Comp {
|
|
|
624
635
|
get_fleet_id(ft) {
|
|
625
636
|
try {
|
|
626
637
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
627
|
-
wasm.comp_get_fleet_id(retptr, this.
|
|
638
|
+
wasm.comp_get_fleet_id(retptr, this.__wbg_ptr, addHeapObject(ft));
|
|
628
639
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
629
640
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
630
|
-
let
|
|
641
|
+
let v1;
|
|
631
642
|
if (r0 !== 0) {
|
|
632
|
-
|
|
643
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
633
644
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
634
645
|
}
|
|
635
|
-
return
|
|
646
|
+
return v1;
|
|
636
647
|
} finally {
|
|
637
648
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
638
649
|
}
|
|
@@ -643,7 +654,7 @@ class Comp {
|
|
|
643
654
|
* @returns {Ship | undefined}
|
|
644
655
|
*/
|
|
645
656
|
get_ship_with_clone(ft, key) {
|
|
646
|
-
const ret = wasm.comp_get_ship_with_clone(this.
|
|
657
|
+
const ret = wasm.comp_get_ship_with_clone(this.__wbg_ptr, addHeapObject(ft), addHeapObject(key));
|
|
647
658
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
648
659
|
}
|
|
649
660
|
/**
|
|
@@ -654,15 +665,15 @@ class Comp {
|
|
|
654
665
|
get_ship_entity_id(ft, key) {
|
|
655
666
|
try {
|
|
656
667
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
657
|
-
wasm.comp_get_ship_entity_id(retptr, this.
|
|
668
|
+
wasm.comp_get_ship_entity_id(retptr, this.__wbg_ptr, addHeapObject(ft), addHeapObject(key));
|
|
658
669
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
659
670
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
660
|
-
let
|
|
671
|
+
let v1;
|
|
661
672
|
if (r0 !== 0) {
|
|
662
|
-
|
|
673
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
663
674
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
664
675
|
}
|
|
665
|
-
return
|
|
676
|
+
return v1;
|
|
666
677
|
} finally {
|
|
667
678
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
668
679
|
}
|
|
@@ -674,14 +685,14 @@ class Comp {
|
|
|
674
685
|
get_ship_by_eid_with_clone(id) {
|
|
675
686
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
676
687
|
const len0 = WASM_VECTOR_LEN;
|
|
677
|
-
const ret = wasm.comp_get_ship_by_eid_with_clone(this.
|
|
688
|
+
const ret = wasm.comp_get_ship_by_eid_with_clone(this.__wbg_ptr, ptr0, len0);
|
|
678
689
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
679
690
|
}
|
|
680
691
|
/**
|
|
681
692
|
* @returns {Formation}
|
|
682
693
|
*/
|
|
683
694
|
default_formation() {
|
|
684
|
-
const ret = wasm.comp_default_formation(this.
|
|
695
|
+
const ret = wasm.comp_default_formation(this.__wbg_ptr);
|
|
685
696
|
return takeObject(ret);
|
|
686
697
|
}
|
|
687
698
|
/**
|
|
@@ -690,7 +701,7 @@ class Comp {
|
|
|
690
701
|
* @returns {number}
|
|
691
702
|
*/
|
|
692
703
|
adjusted_anti_air(formation_mod) {
|
|
693
|
-
const ret = wasm.comp_adjusted_anti_air(this.
|
|
704
|
+
const ret = wasm.comp_adjusted_anti_air(this.__wbg_ptr, formation_mod);
|
|
694
705
|
return ret;
|
|
695
706
|
}
|
|
696
707
|
/**
|
|
@@ -702,7 +713,7 @@ class Comp {
|
|
|
702
713
|
fighter_power(escort_participates, air_type) {
|
|
703
714
|
try {
|
|
704
715
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
705
|
-
wasm.comp_fighter_power(retptr, this.
|
|
716
|
+
wasm.comp_fighter_power(retptr, this.__wbg_ptr, escort_participates, addHeapObject(air_type));
|
|
706
717
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
707
718
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
708
719
|
return r0 === 0 ? undefined : r1;
|
|
@@ -718,7 +729,7 @@ class Comp {
|
|
|
718
729
|
elos(node_divaricated_factor) {
|
|
719
730
|
try {
|
|
720
731
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
721
|
-
wasm.comp_elos(retptr, this.
|
|
732
|
+
wasm.comp_elos(retptr, this.__wbg_ptr, node_divaricated_factor);
|
|
722
733
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
723
734
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
724
735
|
return r0 === 0 ? undefined : r2;
|
|
@@ -731,7 +742,7 @@ class Comp {
|
|
|
731
742
|
* @returns {number}
|
|
732
743
|
*/
|
|
733
744
|
transport_point() {
|
|
734
|
-
const ret = wasm.comp_transport_point(this.
|
|
745
|
+
const ret = wasm.comp_transport_point(this.__wbg_ptr);
|
|
735
746
|
return ret;
|
|
736
747
|
}
|
|
737
748
|
/**
|
|
@@ -741,7 +752,7 @@ class Comp {
|
|
|
741
752
|
*/
|
|
742
753
|
get_ship_conditions(ship, formation) {
|
|
743
754
|
_assertClass(ship, Ship);
|
|
744
|
-
const ret = wasm.comp_get_ship_conditions(this.
|
|
755
|
+
const ret = wasm.comp_get_ship_conditions(this.__wbg_ptr, ship.__wbg_ptr, isLikeNone(formation) ? 0 : addHeapObject(formation));
|
|
745
756
|
return takeObject(ret);
|
|
746
757
|
}
|
|
747
758
|
/**
|
|
@@ -751,7 +762,7 @@ class Comp {
|
|
|
751
762
|
fleet_los_mod(fleet_type) {
|
|
752
763
|
try {
|
|
753
764
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
754
|
-
wasm.comp_fleet_los_mod(retptr, this.
|
|
765
|
+
wasm.comp_fleet_los_mod(retptr, this.__wbg_ptr, addHeapObject(fleet_type));
|
|
755
766
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
756
767
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
757
768
|
return r0 === 0 ? undefined : r2;
|
|
@@ -762,21 +773,22 @@ class Comp {
|
|
|
762
773
|
}
|
|
763
774
|
module.exports.Comp = Comp;
|
|
764
775
|
|
|
765
|
-
const FhCoreFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fhcore_free(ptr));
|
|
776
|
+
const FhCoreFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fhcore_free(ptr >>> 0));
|
|
766
777
|
/**
|
|
767
778
|
*/
|
|
768
779
|
class FhCore {
|
|
769
780
|
|
|
770
781
|
static __wrap(ptr) {
|
|
782
|
+
ptr = ptr >>> 0;
|
|
771
783
|
const obj = Object.create(FhCore.prototype);
|
|
772
|
-
obj.
|
|
773
|
-
FhCoreFinalization.register(obj, obj.
|
|
784
|
+
obj.__wbg_ptr = ptr;
|
|
785
|
+
FhCoreFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
774
786
|
return obj;
|
|
775
787
|
}
|
|
776
788
|
|
|
777
789
|
__destroy_into_raw() {
|
|
778
|
-
const ptr = this.
|
|
779
|
-
this.
|
|
790
|
+
const ptr = this.__wbg_ptr;
|
|
791
|
+
this.__wbg_ptr = 0;
|
|
780
792
|
FhCoreFinalization.unregister(this);
|
|
781
793
|
return ptr;
|
|
782
794
|
}
|
|
@@ -808,7 +820,7 @@ class FhCore {
|
|
|
808
820
|
* @returns {Gear | undefined}
|
|
809
821
|
*/
|
|
810
822
|
create_gear(input) {
|
|
811
|
-
const ret = wasm.fhcore_create_gear(this.
|
|
823
|
+
const ret = wasm.fhcore_create_gear(this.__wbg_ptr, isLikeNone(input) ? 0 : addHeapObject(input));
|
|
812
824
|
return ret === 0 ? undefined : Gear.__wrap(ret);
|
|
813
825
|
}
|
|
814
826
|
/**
|
|
@@ -816,7 +828,7 @@ class FhCore {
|
|
|
816
828
|
* @returns {Ship | undefined}
|
|
817
829
|
*/
|
|
818
830
|
create_ship(input) {
|
|
819
|
-
const ret = wasm.fhcore_create_ship(this.
|
|
831
|
+
const ret = wasm.fhcore_create_ship(this.__wbg_ptr, isLikeNone(input) ? 0 : addHeapObject(input));
|
|
820
832
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
821
833
|
}
|
|
822
834
|
/**
|
|
@@ -824,7 +836,7 @@ class FhCore {
|
|
|
824
836
|
* @returns {AirSquadron}
|
|
825
837
|
*/
|
|
826
838
|
create_air_squadron(input) {
|
|
827
|
-
const ret = wasm.fhcore_create_air_squadron(this.
|
|
839
|
+
const ret = wasm.fhcore_create_air_squadron(this.__wbg_ptr, isLikeNone(input) ? 0 : addHeapObject(input));
|
|
828
840
|
return AirSquadron.__wrap(ret);
|
|
829
841
|
}
|
|
830
842
|
/**
|
|
@@ -832,7 +844,7 @@ class FhCore {
|
|
|
832
844
|
* @returns {Fleet}
|
|
833
845
|
*/
|
|
834
846
|
create_fleet(input) {
|
|
835
|
-
const ret = wasm.fhcore_create_fleet(this.
|
|
847
|
+
const ret = wasm.fhcore_create_fleet(this.__wbg_ptr, isLikeNone(input) ? 0 : addHeapObject(input));
|
|
836
848
|
return Fleet.__wrap(ret);
|
|
837
849
|
}
|
|
838
850
|
/**
|
|
@@ -840,7 +852,7 @@ class FhCore {
|
|
|
840
852
|
* @returns {Org | undefined}
|
|
841
853
|
*/
|
|
842
854
|
create_org(input) {
|
|
843
|
-
const ret = wasm.fhcore_create_org(this.
|
|
855
|
+
const ret = wasm.fhcore_create_org(this.__wbg_ptr, isLikeNone(input) ? 0 : addHeapObject(input));
|
|
844
856
|
return ret === 0 ? undefined : Org.__wrap(ret);
|
|
845
857
|
}
|
|
846
858
|
/**
|
|
@@ -848,14 +860,14 @@ class FhCore {
|
|
|
848
860
|
* @returns {Ship | undefined}
|
|
849
861
|
*/
|
|
850
862
|
create_ship_by_id(ship_id) {
|
|
851
|
-
const ret = wasm.fhcore_create_ship_by_id(this.
|
|
863
|
+
const ret = wasm.fhcore_create_ship_by_id(this.__wbg_ptr, ship_id);
|
|
852
864
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
853
865
|
}
|
|
854
866
|
/**
|
|
855
867
|
* @returns {Ship[]}
|
|
856
868
|
*/
|
|
857
869
|
create_all_ships() {
|
|
858
|
-
const ret = wasm.fhcore_create_all_ships(this.
|
|
870
|
+
const ret = wasm.fhcore_create_all_ships(this.__wbg_ptr);
|
|
859
871
|
return takeObject(ret);
|
|
860
872
|
}
|
|
861
873
|
/**
|
|
@@ -868,41 +880,42 @@ class FhCore {
|
|
|
868
880
|
const len0 = WASM_VECTOR_LEN;
|
|
869
881
|
var ptr1 = isLikeNone(escort) ? 0 : passArray16ToWasm0(escort, wasm.__wbindgen_malloc);
|
|
870
882
|
var len1 = WASM_VECTOR_LEN;
|
|
871
|
-
const ret = wasm.fhcore_create_comp_by_map_enemy(this.
|
|
883
|
+
const ret = wasm.fhcore_create_comp_by_map_enemy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
872
884
|
return Comp.__wrap(ret);
|
|
873
885
|
}
|
|
874
886
|
/**
|
|
875
887
|
* @returns {Ship}
|
|
876
888
|
*/
|
|
877
889
|
create_default_ship() {
|
|
878
|
-
const ret = wasm.fhcore_create_default_ship(this.
|
|
890
|
+
const ret = wasm.fhcore_create_default_ship(this.__wbg_ptr);
|
|
879
891
|
return Ship.__wrap(ret);
|
|
880
892
|
}
|
|
881
893
|
/**
|
|
882
894
|
* @returns {Analyzer}
|
|
883
895
|
*/
|
|
884
896
|
create_analyzer() {
|
|
885
|
-
const ret = wasm.fhcore_create_analyzer(this.
|
|
897
|
+
const ret = wasm.fhcore_create_analyzer(this.__wbg_ptr);
|
|
886
898
|
return Analyzer.__wrap(ret);
|
|
887
899
|
}
|
|
888
900
|
}
|
|
889
901
|
module.exports.FhCore = FhCore;
|
|
890
902
|
|
|
891
|
-
const FleetFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fleet_free(ptr));
|
|
903
|
+
const FleetFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fleet_free(ptr >>> 0));
|
|
892
904
|
/**
|
|
893
905
|
*/
|
|
894
906
|
class Fleet {
|
|
895
907
|
|
|
896
908
|
static __wrap(ptr) {
|
|
909
|
+
ptr = ptr >>> 0;
|
|
897
910
|
const obj = Object.create(Fleet.prototype);
|
|
898
|
-
obj.
|
|
899
|
-
FleetFinalization.register(obj, obj.
|
|
911
|
+
obj.__wbg_ptr = ptr;
|
|
912
|
+
FleetFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
900
913
|
return obj;
|
|
901
914
|
}
|
|
902
915
|
|
|
903
916
|
__destroy_into_raw() {
|
|
904
|
-
const ptr = this.
|
|
905
|
-
this.
|
|
917
|
+
const ptr = this.__wbg_ptr;
|
|
918
|
+
this.__wbg_ptr = 0;
|
|
906
919
|
FleetFinalization.unregister(this);
|
|
907
920
|
return ptr;
|
|
908
921
|
}
|
|
@@ -915,15 +928,19 @@ class Fleet {
|
|
|
915
928
|
* @returns {string}
|
|
916
929
|
*/
|
|
917
930
|
get id() {
|
|
931
|
+
let deferred1_0;
|
|
932
|
+
let deferred1_1;
|
|
918
933
|
try {
|
|
919
934
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
920
|
-
wasm.__wbg_get_fleet_id(retptr, this.
|
|
935
|
+
wasm.__wbg_get_fleet_id(retptr, this.__wbg_ptr);
|
|
921
936
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
922
937
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
938
|
+
deferred1_0 = r0;
|
|
939
|
+
deferred1_1 = r1;
|
|
923
940
|
return getStringFromWasm0(r0, r1);
|
|
924
941
|
} finally {
|
|
925
942
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
926
|
-
wasm.__wbindgen_free(
|
|
943
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
927
944
|
}
|
|
928
945
|
}
|
|
929
946
|
/**
|
|
@@ -932,27 +949,27 @@ class Fleet {
|
|
|
932
949
|
set id(arg0) {
|
|
933
950
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
934
951
|
const len0 = WASM_VECTOR_LEN;
|
|
935
|
-
wasm.__wbg_set_fleet_id(this.
|
|
952
|
+
wasm.__wbg_set_fleet_id(this.__wbg_ptr, ptr0, len0);
|
|
936
953
|
}
|
|
937
954
|
/**
|
|
938
955
|
* @returns {bigint}
|
|
939
956
|
*/
|
|
940
957
|
get hash() {
|
|
941
|
-
const ret = wasm.__wbg_get_fleet_hash(this.
|
|
958
|
+
const ret = wasm.__wbg_get_fleet_hash(this.__wbg_ptr);
|
|
942
959
|
return BigInt.asUintN(64, ret);
|
|
943
960
|
}
|
|
944
961
|
/**
|
|
945
962
|
* @returns {number}
|
|
946
963
|
*/
|
|
947
964
|
get len() {
|
|
948
|
-
const ret = wasm.__wbg_get_fleet_len(this.
|
|
965
|
+
const ret = wasm.__wbg_get_fleet_len(this.__wbg_ptr);
|
|
949
966
|
return ret >>> 0;
|
|
950
967
|
}
|
|
951
968
|
/**
|
|
952
969
|
* @returns {FleetMeta}
|
|
953
970
|
*/
|
|
954
971
|
meta() {
|
|
955
|
-
const ret = wasm.fleet_meta(this.
|
|
972
|
+
const ret = wasm.fleet_meta(this.__wbg_ptr);
|
|
956
973
|
return takeObject(ret);
|
|
957
974
|
}
|
|
958
975
|
/**
|
|
@@ -961,12 +978,12 @@ class Fleet {
|
|
|
961
978
|
ship_keys() {
|
|
962
979
|
try {
|
|
963
980
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
964
|
-
wasm.fleet_ship_keys(retptr, this.
|
|
981
|
+
wasm.fleet_ship_keys(retptr, this.__wbg_ptr);
|
|
965
982
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
966
983
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
967
|
-
var
|
|
984
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
968
985
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
969
|
-
return
|
|
986
|
+
return v1;
|
|
970
987
|
} finally {
|
|
971
988
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
972
989
|
}
|
|
@@ -977,12 +994,12 @@ class Fleet {
|
|
|
977
994
|
ship_ids() {
|
|
978
995
|
try {
|
|
979
996
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
980
|
-
wasm.fleet_ship_ids(retptr, this.
|
|
997
|
+
wasm.fleet_ship_ids(retptr, this.__wbg_ptr);
|
|
981
998
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
982
999
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
983
|
-
var
|
|
1000
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
984
1001
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
985
|
-
return
|
|
1002
|
+
return v1;
|
|
986
1003
|
} finally {
|
|
987
1004
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
988
1005
|
}
|
|
@@ -993,12 +1010,12 @@ class Fleet {
|
|
|
993
1010
|
get_gear_ids_by_improvable() {
|
|
994
1011
|
try {
|
|
995
1012
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
996
|
-
wasm.fleet_get_gear_ids_by_improvable(retptr, this.
|
|
1013
|
+
wasm.fleet_get_gear_ids_by_improvable(retptr, this.__wbg_ptr);
|
|
997
1014
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
998
1015
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
999
|
-
var
|
|
1016
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1000
1017
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1001
|
-
return
|
|
1018
|
+
return v1;
|
|
1002
1019
|
} finally {
|
|
1003
1020
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1004
1021
|
}
|
|
@@ -1009,12 +1026,12 @@ class Fleet {
|
|
|
1009
1026
|
get_gear_ids_by_proficiency() {
|
|
1010
1027
|
try {
|
|
1011
1028
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1012
|
-
wasm.fleet_get_gear_ids_by_proficiency(retptr, this.
|
|
1029
|
+
wasm.fleet_get_gear_ids_by_proficiency(retptr, this.__wbg_ptr);
|
|
1013
1030
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1014
1031
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1015
|
-
var
|
|
1032
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1016
1033
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1017
|
-
return
|
|
1034
|
+
return v1;
|
|
1018
1035
|
} finally {
|
|
1019
1036
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1020
1037
|
}
|
|
@@ -1027,7 +1044,7 @@ class Fleet {
|
|
|
1027
1044
|
get_damage_bound(id, state) {
|
|
1028
1045
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1029
1046
|
const len0 = WASM_VECTOR_LEN;
|
|
1030
|
-
const ret = wasm.fleet_get_damage_bound(this.
|
|
1047
|
+
const ret = wasm.fleet_get_damage_bound(this.__wbg_ptr, ptr0, len0, addHeapObject(state));
|
|
1031
1048
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
1032
1049
|
}
|
|
1033
1050
|
/**
|
|
@@ -1039,7 +1056,7 @@ class Fleet {
|
|
|
1039
1056
|
get_remaining_fuel(id, rate, ceil) {
|
|
1040
1057
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
1058
|
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
-
const ret = wasm.fleet_get_remaining_fuel(this.
|
|
1059
|
+
const ret = wasm.fleet_get_remaining_fuel(this.__wbg_ptr, ptr0, len0, rate, ceil);
|
|
1043
1060
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
1044
1061
|
}
|
|
1045
1062
|
/**
|
|
@@ -1051,14 +1068,14 @@ class Fleet {
|
|
|
1051
1068
|
get_remaining_ammo(id, rate, ceil) {
|
|
1052
1069
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1053
1070
|
const len0 = WASM_VECTOR_LEN;
|
|
1054
|
-
const ret = wasm.fleet_get_remaining_ammo(this.
|
|
1071
|
+
const ret = wasm.fleet_get_remaining_ammo(this.__wbg_ptr, ptr0, len0, rate, ceil);
|
|
1055
1072
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
1056
1073
|
}
|
|
1057
1074
|
/**
|
|
1058
1075
|
* @returns {number}
|
|
1059
1076
|
*/
|
|
1060
1077
|
count_ships() {
|
|
1061
|
-
const ret = wasm.fleet_count_ships(this.
|
|
1078
|
+
const ret = wasm.fleet_count_ships(this.__wbg_ptr);
|
|
1062
1079
|
return ret >>> 0;
|
|
1063
1080
|
}
|
|
1064
1081
|
/**
|
|
@@ -1066,7 +1083,7 @@ class Fleet {
|
|
|
1066
1083
|
* @returns {Ship | undefined}
|
|
1067
1084
|
*/
|
|
1068
1085
|
get_ship(key) {
|
|
1069
|
-
const ret = wasm.fleet_get_ship(this.
|
|
1086
|
+
const ret = wasm.fleet_get_ship(this.__wbg_ptr, addHeapObject(key));
|
|
1070
1087
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
1071
1088
|
}
|
|
1072
1089
|
/**
|
|
@@ -1075,7 +1092,7 @@ class Fleet {
|
|
|
1075
1092
|
get fleet_los_mod() {
|
|
1076
1093
|
try {
|
|
1077
1094
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1078
|
-
wasm.fleet_fleet_los_mod(retptr, this.
|
|
1095
|
+
wasm.fleet_fleet_los_mod(retptr, this.__wbg_ptr);
|
|
1079
1096
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1080
1097
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
1081
1098
|
return r0 === 0 ? undefined : r2;
|
|
@@ -1090,7 +1107,7 @@ class Fleet {
|
|
|
1090
1107
|
fighter_power(air_type) {
|
|
1091
1108
|
try {
|
|
1092
1109
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1093
|
-
wasm.fleet_fighter_power(retptr, this.
|
|
1110
|
+
wasm.fleet_fighter_power(retptr, this.__wbg_ptr, addHeapObject(air_type));
|
|
1094
1111
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1095
1112
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1096
1113
|
return r0 === 0 ? undefined : r1;
|
|
@@ -1107,7 +1124,7 @@ class Fleet {
|
|
|
1107
1124
|
elos(hq_level, node_divaricated_factor) {
|
|
1108
1125
|
try {
|
|
1109
1126
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1110
|
-
wasm.fleet_elos(retptr, this.
|
|
1127
|
+
wasm.fleet_elos(retptr, this.__wbg_ptr, hq_level, node_divaricated_factor);
|
|
1111
1128
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1112
1129
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
1113
1130
|
return r0 === 0 ? undefined : r2;
|
|
@@ -1122,7 +1139,7 @@ class Fleet {
|
|
|
1122
1139
|
aviation_detection_score() {
|
|
1123
1140
|
try {
|
|
1124
1141
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1125
|
-
wasm.fleet_aviation_detection_score(retptr, this.
|
|
1142
|
+
wasm.fleet_aviation_detection_score(retptr, this.__wbg_ptr);
|
|
1126
1143
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1127
1144
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
1128
1145
|
return r0 === 0 ? undefined : r2;
|
|
@@ -1135,7 +1152,7 @@ class Fleet {
|
|
|
1135
1152
|
* @returns {number}
|
|
1136
1153
|
*/
|
|
1137
1154
|
expedition_bonus() {
|
|
1138
|
-
const ret = wasm.fleet_expedition_bonus(this.
|
|
1155
|
+
const ret = wasm.fleet_expedition_bonus(this.__wbg_ptr);
|
|
1139
1156
|
return ret;
|
|
1140
1157
|
}
|
|
1141
1158
|
/**
|
|
@@ -1147,7 +1164,7 @@ class Fleet {
|
|
|
1147
1164
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1148
1165
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1149
1166
|
const len0 = WASM_VECTOR_LEN;
|
|
1150
|
-
wasm.fleet_sum_ship_stat_by(retptr, this.
|
|
1167
|
+
wasm.fleet_sum_ship_stat_by(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1151
1168
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1152
1169
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
1153
1170
|
return r0 === 0 ? undefined : r2;
|
|
@@ -1158,26 +1175,27 @@ class Fleet {
|
|
|
1158
1175
|
/**
|
|
1159
1176
|
*/
|
|
1160
1177
|
reset_battle_state() {
|
|
1161
|
-
wasm.fleet_reset_battle_state(this.
|
|
1178
|
+
wasm.fleet_reset_battle_state(this.__wbg_ptr);
|
|
1162
1179
|
}
|
|
1163
1180
|
}
|
|
1164
1181
|
module.exports.Fleet = Fleet;
|
|
1165
1182
|
|
|
1166
|
-
const GearFinalization = new FinalizationRegistry(ptr => wasm.__wbg_gear_free(ptr));
|
|
1183
|
+
const GearFinalization = new FinalizationRegistry(ptr => wasm.__wbg_gear_free(ptr >>> 0));
|
|
1167
1184
|
/**
|
|
1168
1185
|
*/
|
|
1169
1186
|
class Gear {
|
|
1170
1187
|
|
|
1171
1188
|
static __wrap(ptr) {
|
|
1189
|
+
ptr = ptr >>> 0;
|
|
1172
1190
|
const obj = Object.create(Gear.prototype);
|
|
1173
|
-
obj.
|
|
1174
|
-
GearFinalization.register(obj, obj.
|
|
1191
|
+
obj.__wbg_ptr = ptr;
|
|
1192
|
+
GearFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1175
1193
|
return obj;
|
|
1176
1194
|
}
|
|
1177
1195
|
|
|
1178
1196
|
__destroy_into_raw() {
|
|
1179
|
-
const ptr = this.
|
|
1180
|
-
this.
|
|
1197
|
+
const ptr = this.__wbg_ptr;
|
|
1198
|
+
this.__wbg_ptr = 0;
|
|
1181
1199
|
GearFinalization.unregister(this);
|
|
1182
1200
|
return ptr;
|
|
1183
1201
|
}
|
|
@@ -1190,15 +1208,19 @@ class Gear {
|
|
|
1190
1208
|
* @returns {string}
|
|
1191
1209
|
*/
|
|
1192
1210
|
get id() {
|
|
1211
|
+
let deferred1_0;
|
|
1212
|
+
let deferred1_1;
|
|
1193
1213
|
try {
|
|
1194
1214
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1195
|
-
wasm.__wbg_get_gear_id(retptr, this.
|
|
1215
|
+
wasm.__wbg_get_gear_id(retptr, this.__wbg_ptr);
|
|
1196
1216
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1197
1217
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1218
|
+
deferred1_0 = r0;
|
|
1219
|
+
deferred1_1 = r1;
|
|
1198
1220
|
return getStringFromWasm0(r0, r1);
|
|
1199
1221
|
} finally {
|
|
1200
1222
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1201
|
-
wasm.__wbindgen_free(
|
|
1223
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1202
1224
|
}
|
|
1203
1225
|
}
|
|
1204
1226
|
/**
|
|
@@ -1207,56 +1229,60 @@ class Gear {
|
|
|
1207
1229
|
set id(arg0) {
|
|
1208
1230
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1209
1231
|
const len0 = WASM_VECTOR_LEN;
|
|
1210
|
-
wasm.__wbg_set_gear_id(this.
|
|
1232
|
+
wasm.__wbg_set_gear_id(this.__wbg_ptr, ptr0, len0);
|
|
1211
1233
|
}
|
|
1212
1234
|
/**
|
|
1213
1235
|
* @returns {bigint}
|
|
1214
1236
|
*/
|
|
1215
1237
|
get hash() {
|
|
1216
|
-
const ret = wasm.__wbg_get_gear_hash(this.
|
|
1238
|
+
const ret = wasm.__wbg_get_gear_hash(this.__wbg_ptr);
|
|
1217
1239
|
return BigInt.asUintN(64, ret);
|
|
1218
1240
|
}
|
|
1219
1241
|
/**
|
|
1220
1242
|
* @returns {number}
|
|
1221
1243
|
*/
|
|
1222
1244
|
get gear_id() {
|
|
1223
|
-
const ret = wasm.__wbg_get_gear_gear_id(this.
|
|
1245
|
+
const ret = wasm.__wbg_get_gear_gear_id(this.__wbg_ptr);
|
|
1224
1246
|
return ret;
|
|
1225
1247
|
}
|
|
1226
1248
|
/**
|
|
1227
1249
|
* @returns {number}
|
|
1228
1250
|
*/
|
|
1229
1251
|
get stars() {
|
|
1230
|
-
const ret = wasm.__wbg_get_gear_stars(this.
|
|
1252
|
+
const ret = wasm.__wbg_get_gear_stars(this.__wbg_ptr);
|
|
1231
1253
|
return ret;
|
|
1232
1254
|
}
|
|
1233
1255
|
/**
|
|
1234
1256
|
* @returns {number}
|
|
1235
1257
|
*/
|
|
1236
1258
|
get exp() {
|
|
1237
|
-
const ret = wasm.__wbg_get_gear_exp(this.
|
|
1259
|
+
const ret = wasm.__wbg_get_gear_exp(this.__wbg_ptr);
|
|
1238
1260
|
return ret;
|
|
1239
1261
|
}
|
|
1240
1262
|
/**
|
|
1241
1263
|
* @returns {number}
|
|
1242
1264
|
*/
|
|
1243
1265
|
get default_exp() {
|
|
1244
|
-
const ret = wasm.__wbg_get_gear_default_exp(this.
|
|
1266
|
+
const ret = wasm.__wbg_get_gear_default_exp(this.__wbg_ptr);
|
|
1245
1267
|
return ret;
|
|
1246
1268
|
}
|
|
1247
1269
|
/**
|
|
1248
1270
|
* @returns {string}
|
|
1249
1271
|
*/
|
|
1250
1272
|
get name() {
|
|
1273
|
+
let deferred1_0;
|
|
1274
|
+
let deferred1_1;
|
|
1251
1275
|
try {
|
|
1252
1276
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1253
|
-
wasm.__wbg_get_gear_name(retptr, this.
|
|
1277
|
+
wasm.__wbg_get_gear_name(retptr, this.__wbg_ptr);
|
|
1254
1278
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1255
1279
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1280
|
+
deferred1_0 = r0;
|
|
1281
|
+
deferred1_1 = r1;
|
|
1256
1282
|
return getStringFromWasm0(r0, r1);
|
|
1257
1283
|
} finally {
|
|
1258
1284
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1259
|
-
wasm.__wbindgen_free(
|
|
1285
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1260
1286
|
}
|
|
1261
1287
|
}
|
|
1262
1288
|
/**
|
|
@@ -1265,7 +1291,7 @@ class Gear {
|
|
|
1265
1291
|
set name(arg0) {
|
|
1266
1292
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1267
1293
|
const len0 = WASM_VECTOR_LEN;
|
|
1268
|
-
wasm.__wbg_set_gear_name(this.
|
|
1294
|
+
wasm.__wbg_set_gear_name(this.__wbg_ptr, ptr0, len0);
|
|
1269
1295
|
}
|
|
1270
1296
|
/**
|
|
1271
1297
|
* @returns {Uint8Array}
|
|
@@ -1273,12 +1299,12 @@ class Gear {
|
|
|
1273
1299
|
get types() {
|
|
1274
1300
|
try {
|
|
1275
1301
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1276
|
-
wasm.__wbg_get_gear_types(retptr, this.
|
|
1302
|
+
wasm.__wbg_get_gear_types(retptr, this.__wbg_ptr);
|
|
1277
1303
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1278
1304
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1279
|
-
var
|
|
1305
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1280
1306
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1281
|
-
return
|
|
1307
|
+
return v1;
|
|
1282
1308
|
} finally {
|
|
1283
1309
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1284
1310
|
}
|
|
@@ -1289,139 +1315,139 @@ class Gear {
|
|
|
1289
1315
|
set types(arg0) {
|
|
1290
1316
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1291
1317
|
const len0 = WASM_VECTOR_LEN;
|
|
1292
|
-
wasm.__wbg_set_gear_types(this.
|
|
1318
|
+
wasm.__wbg_set_gear_types(this.__wbg_ptr, ptr0, len0);
|
|
1293
1319
|
}
|
|
1294
1320
|
/**
|
|
1295
1321
|
* @returns {GearType}
|
|
1296
1322
|
*/
|
|
1297
1323
|
get gear_type() {
|
|
1298
|
-
const ret = wasm.__wbg_get_gear_gear_type(this.
|
|
1324
|
+
const ret = wasm.__wbg_get_gear_gear_type(this.__wbg_ptr);
|
|
1299
1325
|
return takeObject(ret);
|
|
1300
1326
|
}
|
|
1301
1327
|
/**
|
|
1302
1328
|
* @returns {number}
|
|
1303
1329
|
*/
|
|
1304
1330
|
get max_hp() {
|
|
1305
|
-
const ret = wasm.__wbg_get_gear_max_hp(this.
|
|
1331
|
+
const ret = wasm.__wbg_get_gear_max_hp(this.__wbg_ptr);
|
|
1306
1332
|
return ret;
|
|
1307
1333
|
}
|
|
1308
1334
|
/**
|
|
1309
1335
|
* @returns {number}
|
|
1310
1336
|
*/
|
|
1311
1337
|
get firepower() {
|
|
1312
|
-
const ret = wasm.__wbg_get_gear_firepower(this.
|
|
1338
|
+
const ret = wasm.__wbg_get_gear_firepower(this.__wbg_ptr);
|
|
1313
1339
|
return ret;
|
|
1314
1340
|
}
|
|
1315
1341
|
/**
|
|
1316
1342
|
* @returns {number}
|
|
1317
1343
|
*/
|
|
1318
1344
|
get armor() {
|
|
1319
|
-
const ret = wasm.__wbg_get_gear_armor(this.
|
|
1345
|
+
const ret = wasm.__wbg_get_gear_armor(this.__wbg_ptr);
|
|
1320
1346
|
return ret;
|
|
1321
1347
|
}
|
|
1322
1348
|
/**
|
|
1323
1349
|
* @returns {number}
|
|
1324
1350
|
*/
|
|
1325
1351
|
get torpedo() {
|
|
1326
|
-
const ret = wasm.__wbg_get_gear_torpedo(this.
|
|
1352
|
+
const ret = wasm.__wbg_get_gear_torpedo(this.__wbg_ptr);
|
|
1327
1353
|
return ret;
|
|
1328
1354
|
}
|
|
1329
1355
|
/**
|
|
1330
1356
|
* @returns {number}
|
|
1331
1357
|
*/
|
|
1332
1358
|
get anti_air() {
|
|
1333
|
-
const ret = wasm.__wbg_get_gear_anti_air(this.
|
|
1359
|
+
const ret = wasm.__wbg_get_gear_anti_air(this.__wbg_ptr);
|
|
1334
1360
|
return ret;
|
|
1335
1361
|
}
|
|
1336
1362
|
/**
|
|
1337
1363
|
* @returns {number}
|
|
1338
1364
|
*/
|
|
1339
1365
|
get speed() {
|
|
1340
|
-
const ret = wasm.__wbg_get_gear_speed(this.
|
|
1366
|
+
const ret = wasm.__wbg_get_gear_speed(this.__wbg_ptr);
|
|
1341
1367
|
return ret;
|
|
1342
1368
|
}
|
|
1343
1369
|
/**
|
|
1344
1370
|
* @returns {number}
|
|
1345
1371
|
*/
|
|
1346
1372
|
get bombing() {
|
|
1347
|
-
const ret = wasm.__wbg_get_gear_bombing(this.
|
|
1373
|
+
const ret = wasm.__wbg_get_gear_bombing(this.__wbg_ptr);
|
|
1348
1374
|
return ret;
|
|
1349
1375
|
}
|
|
1350
1376
|
/**
|
|
1351
1377
|
* @returns {number}
|
|
1352
1378
|
*/
|
|
1353
1379
|
get asw() {
|
|
1354
|
-
const ret = wasm.__wbg_get_gear_asw(this.
|
|
1380
|
+
const ret = wasm.__wbg_get_gear_asw(this.__wbg_ptr);
|
|
1355
1381
|
return ret;
|
|
1356
1382
|
}
|
|
1357
1383
|
/**
|
|
1358
1384
|
* @returns {number}
|
|
1359
1385
|
*/
|
|
1360
1386
|
get los() {
|
|
1361
|
-
const ret = wasm.__wbg_get_gear_los(this.
|
|
1387
|
+
const ret = wasm.__wbg_get_gear_los(this.__wbg_ptr);
|
|
1362
1388
|
return ret;
|
|
1363
1389
|
}
|
|
1364
1390
|
/**
|
|
1365
1391
|
* @returns {number}
|
|
1366
1392
|
*/
|
|
1367
1393
|
get luck() {
|
|
1368
|
-
const ret = wasm.__wbg_get_gear_luck(this.
|
|
1394
|
+
const ret = wasm.__wbg_get_gear_luck(this.__wbg_ptr);
|
|
1369
1395
|
return ret;
|
|
1370
1396
|
}
|
|
1371
1397
|
/**
|
|
1372
1398
|
* @returns {number}
|
|
1373
1399
|
*/
|
|
1374
1400
|
get accuracy() {
|
|
1375
|
-
const ret = wasm.__wbg_get_gear_accuracy(this.
|
|
1401
|
+
const ret = wasm.__wbg_get_gear_accuracy(this.__wbg_ptr);
|
|
1376
1402
|
return ret;
|
|
1377
1403
|
}
|
|
1378
1404
|
/**
|
|
1379
1405
|
* @returns {number}
|
|
1380
1406
|
*/
|
|
1381
1407
|
get evasion() {
|
|
1382
|
-
const ret = wasm.__wbg_get_gear_evasion(this.
|
|
1408
|
+
const ret = wasm.__wbg_get_gear_evasion(this.__wbg_ptr);
|
|
1383
1409
|
return ret;
|
|
1384
1410
|
}
|
|
1385
1411
|
/**
|
|
1386
1412
|
* @returns {number}
|
|
1387
1413
|
*/
|
|
1388
1414
|
get range() {
|
|
1389
|
-
const ret = wasm.__wbg_get_gear_range(this.
|
|
1415
|
+
const ret = wasm.__wbg_get_gear_range(this.__wbg_ptr);
|
|
1390
1416
|
return ret;
|
|
1391
1417
|
}
|
|
1392
1418
|
/**
|
|
1393
1419
|
* @returns {number}
|
|
1394
1420
|
*/
|
|
1395
1421
|
get radius() {
|
|
1396
|
-
const ret = wasm.__wbg_get_gear_radius(this.
|
|
1422
|
+
const ret = wasm.__wbg_get_gear_radius(this.__wbg_ptr);
|
|
1397
1423
|
return ret;
|
|
1398
1424
|
}
|
|
1399
1425
|
/**
|
|
1400
1426
|
* @returns {number}
|
|
1401
1427
|
*/
|
|
1402
1428
|
get cost() {
|
|
1403
|
-
const ret = wasm.__wbg_get_gear_cost(this.
|
|
1429
|
+
const ret = wasm.__wbg_get_gear_cost(this.__wbg_ptr);
|
|
1404
1430
|
return ret;
|
|
1405
1431
|
}
|
|
1406
1432
|
/**
|
|
1407
1433
|
* @returns {boolean}
|
|
1408
1434
|
*/
|
|
1409
1435
|
get improvable() {
|
|
1410
|
-
const ret = wasm.__wbg_get_gear_improvable(this.
|
|
1436
|
+
const ret = wasm.__wbg_get_gear_improvable(this.__wbg_ptr);
|
|
1411
1437
|
return ret !== 0;
|
|
1412
1438
|
}
|
|
1413
1439
|
/**
|
|
1414
1440
|
* @returns {number}
|
|
1415
1441
|
*/
|
|
1416
1442
|
get ship_anti_air_resist() {
|
|
1417
|
-
const ret = wasm.__wbg_get_gear_ship_anti_air_resist(this.
|
|
1443
|
+
const ret = wasm.__wbg_get_gear_ship_anti_air_resist(this.__wbg_ptr);
|
|
1418
1444
|
return ret;
|
|
1419
1445
|
}
|
|
1420
1446
|
/**
|
|
1421
1447
|
* @returns {number}
|
|
1422
1448
|
*/
|
|
1423
1449
|
get fleet_anti_air_resist() {
|
|
1424
|
-
const ret = wasm.__wbg_get_gear_fleet_anti_air_resist(this.
|
|
1450
|
+
const ret = wasm.__wbg_get_gear_fleet_anti_air_resist(this.__wbg_ptr);
|
|
1425
1451
|
return ret;
|
|
1426
1452
|
}
|
|
1427
1453
|
/**
|
|
@@ -1435,21 +1461,21 @@ class Gear {
|
|
|
1435
1461
|
* @returns {number}
|
|
1436
1462
|
*/
|
|
1437
1463
|
get gear_type_id() {
|
|
1438
|
-
const ret = wasm.gear_gear_type_id(this.
|
|
1464
|
+
const ret = wasm.gear_gear_type_id(this.__wbg_ptr);
|
|
1439
1465
|
return ret;
|
|
1440
1466
|
}
|
|
1441
1467
|
/**
|
|
1442
1468
|
* @returns {number}
|
|
1443
1469
|
*/
|
|
1444
1470
|
get special_type() {
|
|
1445
|
-
const ret = wasm.gear_special_type(this.
|
|
1471
|
+
const ret = wasm.gear_special_type(this.__wbg_ptr);
|
|
1446
1472
|
return ret;
|
|
1447
1473
|
}
|
|
1448
1474
|
/**
|
|
1449
1475
|
* @returns {number}
|
|
1450
1476
|
*/
|
|
1451
1477
|
get icon_id() {
|
|
1452
|
-
const ret = wasm.gear_icon_id(this.
|
|
1478
|
+
const ret = wasm.gear_icon_id(this.__wbg_ptr);
|
|
1453
1479
|
return ret;
|
|
1454
1480
|
}
|
|
1455
1481
|
/**
|
|
@@ -1457,63 +1483,63 @@ class Gear {
|
|
|
1457
1483
|
* @returns {boolean}
|
|
1458
1484
|
*/
|
|
1459
1485
|
has_attr(attr) {
|
|
1460
|
-
const ret = wasm.gear_has_attr(this.
|
|
1486
|
+
const ret = wasm.gear_has_attr(this.__wbg_ptr, addHeapObject(attr));
|
|
1461
1487
|
return ret !== 0;
|
|
1462
1488
|
}
|
|
1463
1489
|
/**
|
|
1464
1490
|
* @returns {GearCategory}
|
|
1465
1491
|
*/
|
|
1466
1492
|
category() {
|
|
1467
|
-
const ret = wasm.gear_category(this.
|
|
1493
|
+
const ret = wasm.gear_category(this.__wbg_ptr);
|
|
1468
1494
|
return takeObject(ret);
|
|
1469
1495
|
}
|
|
1470
1496
|
/**
|
|
1471
1497
|
* @returns {number}
|
|
1472
1498
|
*/
|
|
1473
1499
|
get ace() {
|
|
1474
|
-
const ret = wasm.gear_ace(this.
|
|
1500
|
+
const ret = wasm.gear_ace(this.__wbg_ptr);
|
|
1475
1501
|
return ret;
|
|
1476
1502
|
}
|
|
1477
1503
|
/**
|
|
1478
1504
|
* @returns {number}
|
|
1479
1505
|
*/
|
|
1480
1506
|
get anti_bomber() {
|
|
1481
|
-
const ret = wasm.gear_anti_bomber(this.
|
|
1507
|
+
const ret = wasm.gear_anti_bomber(this.__wbg_ptr);
|
|
1482
1508
|
return ret;
|
|
1483
1509
|
}
|
|
1484
1510
|
/**
|
|
1485
1511
|
* @returns {number}
|
|
1486
1512
|
*/
|
|
1487
1513
|
get interception() {
|
|
1488
|
-
const ret = wasm.gear_interception(this.
|
|
1514
|
+
const ret = wasm.gear_interception(this.__wbg_ptr);
|
|
1489
1515
|
return ret;
|
|
1490
1516
|
}
|
|
1491
1517
|
/**
|
|
1492
1518
|
* @returns {boolean}
|
|
1493
1519
|
*/
|
|
1494
1520
|
is_high_angle_mount() {
|
|
1495
|
-
const ret = wasm.gear_is_high_angle_mount(this.
|
|
1521
|
+
const ret = wasm.gear_is_high_angle_mount(this.__wbg_ptr);
|
|
1496
1522
|
return ret !== 0;
|
|
1497
1523
|
}
|
|
1498
1524
|
/**
|
|
1499
1525
|
* @returns {boolean}
|
|
1500
1526
|
*/
|
|
1501
1527
|
is_carrier_shelling_plane() {
|
|
1502
|
-
const ret = wasm.gear_is_carrier_shelling_plane(this.
|
|
1528
|
+
const ret = wasm.gear_is_carrier_shelling_plane(this.__wbg_ptr);
|
|
1503
1529
|
return ret !== 0;
|
|
1504
1530
|
}
|
|
1505
1531
|
/**
|
|
1506
1532
|
* @returns {boolean}
|
|
1507
1533
|
*/
|
|
1508
1534
|
has_proficiency() {
|
|
1509
|
-
const ret = wasm.gear_can_be_deployed_to_land_base(this.
|
|
1535
|
+
const ret = wasm.gear_can_be_deployed_to_land_base(this.__wbg_ptr);
|
|
1510
1536
|
return ret !== 0;
|
|
1511
1537
|
}
|
|
1512
1538
|
/**
|
|
1513
1539
|
* @returns {boolean}
|
|
1514
1540
|
*/
|
|
1515
1541
|
max_exp_eq_120() {
|
|
1516
|
-
const ret = wasm.gear_max_exp_eq_120(this.
|
|
1542
|
+
const ret = wasm.gear_max_exp_eq_120(this.__wbg_ptr);
|
|
1517
1543
|
return ret !== 0;
|
|
1518
1544
|
}
|
|
1519
1545
|
/**
|
|
@@ -1521,7 +1547,7 @@ class Gear {
|
|
|
1521
1547
|
* @returns {number}
|
|
1522
1548
|
*/
|
|
1523
1549
|
calc_fighter_power(slot_size) {
|
|
1524
|
-
const ret = wasm.gear_calc_fighter_power(this.
|
|
1550
|
+
const ret = wasm.gear_calc_fighter_power(this.__wbg_ptr, slot_size);
|
|
1525
1551
|
return ret;
|
|
1526
1552
|
}
|
|
1527
1553
|
/**
|
|
@@ -1529,21 +1555,21 @@ class Gear {
|
|
|
1529
1555
|
* @returns {number}
|
|
1530
1556
|
*/
|
|
1531
1557
|
calc_interception_power(slot_size) {
|
|
1532
|
-
const ret = wasm.gear_calc_interception_power(this.
|
|
1558
|
+
const ret = wasm.gear_calc_interception_power(this.__wbg_ptr, slot_size);
|
|
1533
1559
|
return ret;
|
|
1534
1560
|
}
|
|
1535
1561
|
/**
|
|
1536
1562
|
* @returns {number}
|
|
1537
1563
|
*/
|
|
1538
1564
|
fleet_anti_air_mod() {
|
|
1539
|
-
const ret = wasm.gear_fleet_anti_air_mod(this.
|
|
1565
|
+
const ret = wasm.gear_fleet_anti_air_mod(this.__wbg_ptr);
|
|
1540
1566
|
return ret;
|
|
1541
1567
|
}
|
|
1542
1568
|
/**
|
|
1543
1569
|
* @returns {number}
|
|
1544
1570
|
*/
|
|
1545
1571
|
ship_anti_air_mod() {
|
|
1546
|
-
const ret = wasm.gear_ship_anti_air_mod(this.
|
|
1572
|
+
const ret = wasm.gear_ship_anti_air_mod(this.__wbg_ptr);
|
|
1547
1573
|
return ret;
|
|
1548
1574
|
}
|
|
1549
1575
|
/**
|
|
@@ -1551,7 +1577,7 @@ class Gear {
|
|
|
1551
1577
|
* @returns {number}
|
|
1552
1578
|
*/
|
|
1553
1579
|
calc_contact_trigger_factor(slot_size) {
|
|
1554
|
-
const ret = wasm.gear_calc_contact_trigger_factor(this.
|
|
1580
|
+
const ret = wasm.gear_calc_contact_trigger_factor(this.__wbg_ptr, slot_size);
|
|
1555
1581
|
return ret;
|
|
1556
1582
|
}
|
|
1557
1583
|
/**
|
|
@@ -1559,7 +1585,7 @@ class Gear {
|
|
|
1559
1585
|
* @returns {number}
|
|
1560
1586
|
*/
|
|
1561
1587
|
contact_selection_rate(rank) {
|
|
1562
|
-
const ret = wasm.gear_contact_selection_rate(this.
|
|
1588
|
+
const ret = wasm.gear_contact_selection_rate(this.__wbg_ptr, addHeapObject(rank));
|
|
1563
1589
|
return ret;
|
|
1564
1590
|
}
|
|
1565
1591
|
/**
|
|
@@ -1567,28 +1593,28 @@ class Gear {
|
|
|
1567
1593
|
* @returns {number}
|
|
1568
1594
|
*/
|
|
1569
1595
|
night_contact_rate(level) {
|
|
1570
|
-
const ret = wasm.gear_night_contact_rate(this.
|
|
1596
|
+
const ret = wasm.gear_night_contact_rate(this.__wbg_ptr, level);
|
|
1571
1597
|
return ret;
|
|
1572
1598
|
}
|
|
1573
1599
|
/**
|
|
1574
1600
|
* @returns {boolean}
|
|
1575
1601
|
*/
|
|
1576
1602
|
is_night_attacker() {
|
|
1577
|
-
const ret = wasm.gear_is_night_attacker(this.
|
|
1603
|
+
const ret = wasm.gear_is_night_attacker(this.__wbg_ptr);
|
|
1578
1604
|
return ret !== 0;
|
|
1579
1605
|
}
|
|
1580
1606
|
/**
|
|
1581
1607
|
* @returns {boolean}
|
|
1582
1608
|
*/
|
|
1583
1609
|
is_night_fighter() {
|
|
1584
|
-
const ret = wasm.gear_is_night_fighter(this.
|
|
1610
|
+
const ret = wasm.gear_is_night_fighter(this.__wbg_ptr);
|
|
1585
1611
|
return ret !== 0;
|
|
1586
1612
|
}
|
|
1587
1613
|
/**
|
|
1588
1614
|
* @returns {boolean}
|
|
1589
1615
|
*/
|
|
1590
1616
|
is_night_plane() {
|
|
1591
|
-
const ret = wasm.gear_is_night_plane(this.
|
|
1617
|
+
const ret = wasm.gear_is_night_plane(this.__wbg_ptr);
|
|
1592
1618
|
return ret !== 0;
|
|
1593
1619
|
}
|
|
1594
1620
|
/**
|
|
@@ -1597,69 +1623,70 @@ class Gear {
|
|
|
1597
1623
|
* @returns {number}
|
|
1598
1624
|
*/
|
|
1599
1625
|
night_plane_power(slot_size, anti_inst) {
|
|
1600
|
-
const ret = wasm.gear_night_plane_power(this.
|
|
1626
|
+
const ret = wasm.gear_night_plane_power(this.__wbg_ptr, slot_size, anti_inst);
|
|
1601
1627
|
return ret;
|
|
1602
1628
|
}
|
|
1603
1629
|
/**
|
|
1604
1630
|
* @returns {number}
|
|
1605
1631
|
*/
|
|
1606
1632
|
elos() {
|
|
1607
|
-
const ret = wasm.gear_elos(this.
|
|
1633
|
+
const ret = wasm.gear_elos(this.__wbg_ptr);
|
|
1608
1634
|
return ret;
|
|
1609
1635
|
}
|
|
1610
1636
|
/**
|
|
1611
1637
|
* @returns {boolean}
|
|
1612
1638
|
*/
|
|
1613
1639
|
is_abyssal() {
|
|
1614
|
-
const ret = wasm.gear_is_abyssal(this.
|
|
1640
|
+
const ret = wasm.gear_is_abyssal(this.__wbg_ptr);
|
|
1615
1641
|
return ret !== 0;
|
|
1616
1642
|
}
|
|
1617
1643
|
/**
|
|
1618
1644
|
* @returns {boolean}
|
|
1619
1645
|
*/
|
|
1620
1646
|
is_abyssal_cuttlefish_torpedo() {
|
|
1621
|
-
const ret = wasm.gear_is_abyssal_cuttlefish_torpedo(this.
|
|
1647
|
+
const ret = wasm.gear_is_abyssal_cuttlefish_torpedo(this.__wbg_ptr);
|
|
1622
1648
|
return ret !== 0;
|
|
1623
1649
|
}
|
|
1624
1650
|
/**
|
|
1625
1651
|
* @returns {boolean}
|
|
1626
1652
|
*/
|
|
1627
1653
|
is_abyssal_patrolling_attack_hawk() {
|
|
1628
|
-
const ret = wasm.gear_is_abyssal_patrolling_attack_hawk(this.
|
|
1654
|
+
const ret = wasm.gear_is_abyssal_patrolling_attack_hawk(this.__wbg_ptr);
|
|
1629
1655
|
return ret !== 0;
|
|
1630
1656
|
}
|
|
1631
1657
|
/**
|
|
1632
1658
|
* @returns {number}
|
|
1633
1659
|
*/
|
|
1634
1660
|
expedition_bonus() {
|
|
1635
|
-
const ret = wasm.gear_expedition_bonus(this.
|
|
1661
|
+
const ret = wasm.gear_expedition_bonus(this.__wbg_ptr);
|
|
1636
1662
|
return ret;
|
|
1637
1663
|
}
|
|
1638
1664
|
/**
|
|
1639
1665
|
* @returns {boolean}
|
|
1640
1666
|
*/
|
|
1641
1667
|
can_be_deployed_to_land_base() {
|
|
1642
|
-
const ret = wasm.gear_can_be_deployed_to_land_base(this.
|
|
1668
|
+
const ret = wasm.gear_can_be_deployed_to_land_base(this.__wbg_ptr);
|
|
1643
1669
|
return ret !== 0;
|
|
1644
1670
|
}
|
|
1645
1671
|
}
|
|
1646
1672
|
module.exports.Gear = Gear;
|
|
1647
1673
|
|
|
1648
|
-
const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr));
|
|
1674
|
+
const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr >>> 0));
|
|
1649
1675
|
/**
|
|
1650
1676
|
*/
|
|
1651
1677
|
class Org {
|
|
1652
1678
|
|
|
1653
1679
|
static __wrap(ptr) {
|
|
1680
|
+
ptr = ptr >>> 0;
|
|
1654
1681
|
const obj = Object.create(Org.prototype);
|
|
1655
|
-
obj.
|
|
1656
|
-
OrgFinalization.register(obj, obj.
|
|
1682
|
+
obj.__wbg_ptr = ptr;
|
|
1683
|
+
OrgFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1657
1684
|
return obj;
|
|
1658
1685
|
}
|
|
1659
1686
|
|
|
1660
1687
|
__destroy_into_raw() {
|
|
1661
|
-
const ptr = this.
|
|
1662
|
-
this.
|
|
1688
|
+
const ptr = this.__wbg_ptr;
|
|
1689
|
+
this.__wbg_ptr = 0;
|
|
1663
1690
|
OrgFinalization.unregister(this);
|
|
1664
1691
|
return ptr;
|
|
1665
1692
|
}
|
|
@@ -1672,15 +1699,19 @@ class Org {
|
|
|
1672
1699
|
* @returns {string}
|
|
1673
1700
|
*/
|
|
1674
1701
|
get id() {
|
|
1702
|
+
let deferred1_0;
|
|
1703
|
+
let deferred1_1;
|
|
1675
1704
|
try {
|
|
1676
1705
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1677
|
-
wasm.__wbg_get_org_id(retptr, this.
|
|
1706
|
+
wasm.__wbg_get_org_id(retptr, this.__wbg_ptr);
|
|
1678
1707
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1679
1708
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1709
|
+
deferred1_0 = r0;
|
|
1710
|
+
deferred1_1 = r1;
|
|
1680
1711
|
return getStringFromWasm0(r0, r1);
|
|
1681
1712
|
} finally {
|
|
1682
1713
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1683
|
-
wasm.__wbindgen_free(
|
|
1714
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1684
1715
|
}
|
|
1685
1716
|
}
|
|
1686
1717
|
/**
|
|
@@ -1689,48 +1720,48 @@ class Org {
|
|
|
1689
1720
|
set id(arg0) {
|
|
1690
1721
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1691
1722
|
const len0 = WASM_VECTOR_LEN;
|
|
1692
|
-
wasm.__wbg_set_org_id(this.
|
|
1723
|
+
wasm.__wbg_set_org_id(this.__wbg_ptr, ptr0, len0);
|
|
1693
1724
|
}
|
|
1694
1725
|
/**
|
|
1695
1726
|
* @returns {bigint}
|
|
1696
1727
|
*/
|
|
1697
1728
|
get hash() {
|
|
1698
|
-
const ret = wasm.__wbg_get_org_hash(this.
|
|
1729
|
+
const ret = wasm.__wbg_get_org_hash(this.__wbg_ptr);
|
|
1699
1730
|
return BigInt.asUintN(64, ret);
|
|
1700
1731
|
}
|
|
1701
1732
|
/**
|
|
1702
1733
|
* @returns {number}
|
|
1703
1734
|
*/
|
|
1704
1735
|
get hq_level() {
|
|
1705
|
-
const ret = wasm.__wbg_get_org_hq_level(this.
|
|
1736
|
+
const ret = wasm.__wbg_get_org_hq_level(this.__wbg_ptr);
|
|
1706
1737
|
return ret;
|
|
1707
1738
|
}
|
|
1708
1739
|
/**
|
|
1709
1740
|
* @returns {OrgType}
|
|
1710
1741
|
*/
|
|
1711
1742
|
get org_type() {
|
|
1712
|
-
const ret = wasm.__wbg_get_org_org_type(this.
|
|
1743
|
+
const ret = wasm.__wbg_get_org_org_type(this.__wbg_ptr);
|
|
1713
1744
|
return takeObject(ret);
|
|
1714
1745
|
}
|
|
1715
1746
|
/**
|
|
1716
1747
|
* @returns {FleetKey}
|
|
1717
1748
|
*/
|
|
1718
1749
|
get sortie() {
|
|
1719
|
-
const ret = wasm.__wbg_get_org_sortie(this.
|
|
1750
|
+
const ret = wasm.__wbg_get_org_sortie(this.__wbg_ptr);
|
|
1720
1751
|
return takeObject(ret);
|
|
1721
1752
|
}
|
|
1722
1753
|
/**
|
|
1723
1754
|
* @returns {FleetKey | undefined}
|
|
1724
1755
|
*/
|
|
1725
1756
|
get route_sup() {
|
|
1726
|
-
const ret = wasm.__wbg_get_org_route_sup(this.
|
|
1757
|
+
const ret = wasm.__wbg_get_org_route_sup(this.__wbg_ptr);
|
|
1727
1758
|
return takeObject(ret);
|
|
1728
1759
|
}
|
|
1729
1760
|
/**
|
|
1730
1761
|
* @returns {FleetKey | undefined}
|
|
1731
1762
|
*/
|
|
1732
1763
|
get boss_sup() {
|
|
1733
|
-
const ret = wasm.__wbg_get_org_boss_sup(this.
|
|
1764
|
+
const ret = wasm.__wbg_get_org_boss_sup(this.__wbg_ptr);
|
|
1734
1765
|
return takeObject(ret);
|
|
1735
1766
|
}
|
|
1736
1767
|
/**
|
|
@@ -1739,15 +1770,15 @@ class Org {
|
|
|
1739
1770
|
first_ship_id() {
|
|
1740
1771
|
try {
|
|
1741
1772
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1742
|
-
wasm.org_first_ship_id(retptr, this.
|
|
1773
|
+
wasm.org_first_ship_id(retptr, this.__wbg_ptr);
|
|
1743
1774
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1744
1775
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1745
|
-
let
|
|
1776
|
+
let v1;
|
|
1746
1777
|
if (r0 !== 0) {
|
|
1747
|
-
|
|
1778
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1748
1779
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1749
1780
|
}
|
|
1750
|
-
return
|
|
1781
|
+
return v1;
|
|
1751
1782
|
} finally {
|
|
1752
1783
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1753
1784
|
}
|
|
@@ -1758,7 +1789,7 @@ class Org {
|
|
|
1758
1789
|
* @returns {number | undefined}
|
|
1759
1790
|
*/
|
|
1760
1791
|
get_ship_mid(fleet_key, ship_key) {
|
|
1761
|
-
const ret = wasm.org_get_ship_mid(this.
|
|
1792
|
+
const ret = wasm.org_get_ship_mid(this.__wbg_ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
1762
1793
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
1763
1794
|
}
|
|
1764
1795
|
/**
|
|
@@ -1769,15 +1800,15 @@ class Org {
|
|
|
1769
1800
|
get_ship_eid(fleet_key, ship_key) {
|
|
1770
1801
|
try {
|
|
1771
1802
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1772
|
-
wasm.org_get_ship_eid(retptr, this.
|
|
1803
|
+
wasm.org_get_ship_eid(retptr, this.__wbg_ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
1773
1804
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1774
1805
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1775
|
-
let
|
|
1806
|
+
let v1;
|
|
1776
1807
|
if (r0 !== 0) {
|
|
1777
|
-
|
|
1808
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1778
1809
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1779
1810
|
}
|
|
1780
|
-
return
|
|
1811
|
+
return v1;
|
|
1781
1812
|
} finally {
|
|
1782
1813
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1783
1814
|
}
|
|
@@ -1787,15 +1818,19 @@ class Org {
|
|
|
1787
1818
|
* @returns {string}
|
|
1788
1819
|
*/
|
|
1789
1820
|
get_fleet_id(key) {
|
|
1821
|
+
let deferred1_0;
|
|
1822
|
+
let deferred1_1;
|
|
1790
1823
|
try {
|
|
1791
1824
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1792
|
-
wasm.org_get_fleet_id(retptr, this.
|
|
1825
|
+
wasm.org_get_fleet_id(retptr, this.__wbg_ptr, addHeapObject(key));
|
|
1793
1826
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1794
1827
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1828
|
+
deferred1_0 = r0;
|
|
1829
|
+
deferred1_1 = r1;
|
|
1795
1830
|
return getStringFromWasm0(r0, r1);
|
|
1796
1831
|
} finally {
|
|
1797
1832
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1798
|
-
wasm.__wbindgen_free(
|
|
1833
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1799
1834
|
}
|
|
1800
1835
|
}
|
|
1801
1836
|
/**
|
|
@@ -1804,12 +1839,12 @@ class Org {
|
|
|
1804
1839
|
air_squadron_ids() {
|
|
1805
1840
|
try {
|
|
1806
1841
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1807
|
-
wasm.org_air_squadron_ids(retptr, this.
|
|
1842
|
+
wasm.org_air_squadron_ids(retptr, this.__wbg_ptr);
|
|
1808
1843
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1809
1844
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1810
|
-
var
|
|
1845
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1811
1846
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1812
|
-
return
|
|
1847
|
+
return v1;
|
|
1813
1848
|
} finally {
|
|
1814
1849
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1815
1850
|
}
|
|
@@ -1820,12 +1855,12 @@ class Org {
|
|
|
1820
1855
|
main_ship_ids() {
|
|
1821
1856
|
try {
|
|
1822
1857
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1823
|
-
wasm.org_main_ship_ids(retptr, this.
|
|
1858
|
+
wasm.org_main_ship_ids(retptr, this.__wbg_ptr);
|
|
1824
1859
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1825
1860
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1826
|
-
var
|
|
1861
|
+
var v1 = getArrayU16FromWasm0(r0, r1).slice();
|
|
1827
1862
|
wasm.__wbindgen_free(r0, r1 * 2);
|
|
1828
|
-
return
|
|
1863
|
+
return v1;
|
|
1829
1864
|
} finally {
|
|
1830
1865
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1831
1866
|
}
|
|
@@ -1836,12 +1871,12 @@ class Org {
|
|
|
1836
1871
|
escort_ship_ids() {
|
|
1837
1872
|
try {
|
|
1838
1873
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1839
|
-
wasm.org_escort_ship_ids(retptr, this.
|
|
1874
|
+
wasm.org_escort_ship_ids(retptr, this.__wbg_ptr);
|
|
1840
1875
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1841
1876
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1842
|
-
var
|
|
1877
|
+
var v1 = getArrayU16FromWasm0(r0, r1).slice();
|
|
1843
1878
|
wasm.__wbindgen_free(r0, r1 * 2);
|
|
1844
|
-
return
|
|
1879
|
+
return v1;
|
|
1845
1880
|
} finally {
|
|
1846
1881
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1847
1882
|
}
|
|
@@ -1851,7 +1886,7 @@ class Org {
|
|
|
1851
1886
|
* @returns {Fleet}
|
|
1852
1887
|
*/
|
|
1853
1888
|
clone_fleet(key) {
|
|
1854
|
-
const ret = wasm.org_clone_fleet(this.
|
|
1889
|
+
const ret = wasm.org_clone_fleet(this.__wbg_ptr, addHeapObject(key));
|
|
1855
1890
|
return Fleet.__wrap(ret);
|
|
1856
1891
|
}
|
|
1857
1892
|
/**
|
|
@@ -1860,7 +1895,7 @@ class Org {
|
|
|
1860
1895
|
* @returns {Ship | undefined}
|
|
1861
1896
|
*/
|
|
1862
1897
|
clone_ship(fleet_key, ship_key) {
|
|
1863
|
-
const ret = wasm.org_clone_ship(this.
|
|
1898
|
+
const ret = wasm.org_clone_ship(this.__wbg_ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
1864
1899
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
1865
1900
|
}
|
|
1866
1901
|
/**
|
|
@@ -1870,7 +1905,7 @@ class Org {
|
|
|
1870
1905
|
get_ship_by_id(id) {
|
|
1871
1906
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1872
1907
|
const len0 = WASM_VECTOR_LEN;
|
|
1873
|
-
const ret = wasm.org_get_ship_by_id(this.
|
|
1908
|
+
const ret = wasm.org_get_ship_by_id(this.__wbg_ptr, ptr0, len0);
|
|
1874
1909
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
1875
1910
|
}
|
|
1876
1911
|
/**
|
|
@@ -1880,12 +1915,12 @@ class Org {
|
|
|
1880
1915
|
ship_keys(key) {
|
|
1881
1916
|
try {
|
|
1882
1917
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1883
|
-
wasm.org_ship_keys(retptr, this.
|
|
1918
|
+
wasm.org_ship_keys(retptr, this.__wbg_ptr, addHeapObject(key));
|
|
1884
1919
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1885
1920
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1886
|
-
var
|
|
1921
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1887
1922
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1888
|
-
return
|
|
1923
|
+
return v1;
|
|
1889
1924
|
} finally {
|
|
1890
1925
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1891
1926
|
}
|
|
@@ -1894,7 +1929,7 @@ class Org {
|
|
|
1894
1929
|
* @returns {Comp}
|
|
1895
1930
|
*/
|
|
1896
1931
|
create_comp() {
|
|
1897
|
-
const ret = wasm.org_create_comp(this.
|
|
1932
|
+
const ret = wasm.org_create_comp(this.__wbg_ptr);
|
|
1898
1933
|
return Comp.__wrap(ret);
|
|
1899
1934
|
}
|
|
1900
1935
|
/**
|
|
@@ -1902,7 +1937,7 @@ class Org {
|
|
|
1902
1937
|
* @returns {Comp}
|
|
1903
1938
|
*/
|
|
1904
1939
|
create_comp_by_key(key) {
|
|
1905
|
-
const ret = wasm.org_create_comp_by_key(this.
|
|
1940
|
+
const ret = wasm.org_create_comp_by_key(this.__wbg_ptr, addHeapObject(key));
|
|
1906
1941
|
return Comp.__wrap(ret);
|
|
1907
1942
|
}
|
|
1908
1943
|
/**
|
|
@@ -1914,7 +1949,7 @@ class Org {
|
|
|
1914
1949
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1915
1950
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1916
1951
|
const len0 = WASM_VECTOR_LEN;
|
|
1917
|
-
wasm.org_get_air_squadron(retptr, this.
|
|
1952
|
+
wasm.org_get_air_squadron(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1918
1953
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1919
1954
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1920
1955
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -1932,12 +1967,12 @@ class Org {
|
|
|
1932
1967
|
get_air_squadron_gear_ids_by_improvable() {
|
|
1933
1968
|
try {
|
|
1934
1969
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1935
|
-
wasm.org_get_air_squadron_gear_ids_by_improvable(retptr, this.
|
|
1970
|
+
wasm.org_get_air_squadron_gear_ids_by_improvable(retptr, this.__wbg_ptr);
|
|
1936
1971
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1937
1972
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1938
|
-
var
|
|
1973
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1939
1974
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1940
|
-
return
|
|
1975
|
+
return v1;
|
|
1941
1976
|
} finally {
|
|
1942
1977
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1943
1978
|
}
|
|
@@ -1948,12 +1983,12 @@ class Org {
|
|
|
1948
1983
|
get_air_squadron_gear_ids_by_proficiency() {
|
|
1949
1984
|
try {
|
|
1950
1985
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1951
|
-
wasm.org_get_air_squadron_gear_ids_by_proficiency(retptr, this.
|
|
1986
|
+
wasm.org_get_air_squadron_gear_ids_by_proficiency(retptr, this.__wbg_ptr);
|
|
1952
1987
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1953
1988
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1954
|
-
var
|
|
1989
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1955
1990
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1956
|
-
return
|
|
1991
|
+
return v1;
|
|
1957
1992
|
} finally {
|
|
1958
1993
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1959
1994
|
}
|
|
@@ -1962,35 +1997,35 @@ class Org {
|
|
|
1962
1997
|
* @returns {Side}
|
|
1963
1998
|
*/
|
|
1964
1999
|
side() {
|
|
1965
|
-
const ret = wasm.org_side(this.
|
|
2000
|
+
const ret = wasm.org_side(this.__wbg_ptr);
|
|
1966
2001
|
return takeObject(ret);
|
|
1967
2002
|
}
|
|
1968
2003
|
/**
|
|
1969
2004
|
* @returns {boolean}
|
|
1970
2005
|
*/
|
|
1971
2006
|
is_player() {
|
|
1972
|
-
const ret = wasm.org_is_player(this.
|
|
2007
|
+
const ret = wasm.org_is_player(this.__wbg_ptr);
|
|
1973
2008
|
return ret !== 0;
|
|
1974
2009
|
}
|
|
1975
2010
|
/**
|
|
1976
2011
|
* @returns {boolean}
|
|
1977
2012
|
*/
|
|
1978
2013
|
is_enemy() {
|
|
1979
|
-
const ret = wasm.org_is_enemy(this.
|
|
2014
|
+
const ret = wasm.org_is_enemy(this.__wbg_ptr);
|
|
1980
2015
|
return ret !== 0;
|
|
1981
2016
|
}
|
|
1982
2017
|
/**
|
|
1983
2018
|
* @returns {boolean}
|
|
1984
2019
|
*/
|
|
1985
2020
|
is_single() {
|
|
1986
|
-
const ret = wasm.org_is_single(this.
|
|
2021
|
+
const ret = wasm.org_is_single(this.__wbg_ptr);
|
|
1987
2022
|
return ret !== 0;
|
|
1988
2023
|
}
|
|
1989
2024
|
/**
|
|
1990
2025
|
* @returns {boolean}
|
|
1991
2026
|
*/
|
|
1992
2027
|
is_combined() {
|
|
1993
|
-
const ret = wasm.org_is_combined(this.
|
|
2028
|
+
const ret = wasm.org_is_combined(this.__wbg_ptr);
|
|
1994
2029
|
return ret !== 0;
|
|
1995
2030
|
}
|
|
1996
2031
|
/**
|
|
@@ -1998,7 +2033,7 @@ class Org {
|
|
|
1998
2033
|
* @returns {number}
|
|
1999
2034
|
*/
|
|
2000
2035
|
interception_power() {
|
|
2001
|
-
const ret = wasm.org_interception_power(this.
|
|
2036
|
+
const ret = wasm.org_interception_power(this.__wbg_ptr);
|
|
2002
2037
|
return ret;
|
|
2003
2038
|
}
|
|
2004
2039
|
/**
|
|
@@ -2006,7 +2041,7 @@ class Org {
|
|
|
2006
2041
|
* @returns {number}
|
|
2007
2042
|
*/
|
|
2008
2043
|
high_altitude_interception_power() {
|
|
2009
|
-
const ret = wasm.org_high_altitude_interception_power(this.
|
|
2044
|
+
const ret = wasm.org_high_altitude_interception_power(this.__wbg_ptr);
|
|
2010
2045
|
return ret;
|
|
2011
2046
|
}
|
|
2012
2047
|
/**
|
|
@@ -2018,7 +2053,7 @@ class Org {
|
|
|
2018
2053
|
create_move_ship_payload(id, x, y) {
|
|
2019
2054
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2020
2055
|
const len0 = WASM_VECTOR_LEN;
|
|
2021
|
-
const ret = wasm.org_create_move_ship_payload(this.
|
|
2056
|
+
const ret = wasm.org_create_move_ship_payload(this.__wbg_ptr, ptr0, len0, x, y);
|
|
2022
2057
|
return takeObject(ret);
|
|
2023
2058
|
}
|
|
2024
2059
|
/**
|
|
@@ -2026,27 +2061,28 @@ class Org {
|
|
|
2026
2061
|
* @returns {FleetType | undefined}
|
|
2027
2062
|
*/
|
|
2028
2063
|
get_fleet_type(key) {
|
|
2029
|
-
const ret = wasm.org_get_fleet_type(this.
|
|
2064
|
+
const ret = wasm.org_get_fleet_type(this.__wbg_ptr, addHeapObject(key));
|
|
2030
2065
|
return takeObject(ret);
|
|
2031
2066
|
}
|
|
2032
2067
|
}
|
|
2033
2068
|
module.exports.Org = Org;
|
|
2034
2069
|
|
|
2035
|
-
const ShipFinalization = new FinalizationRegistry(ptr => wasm.__wbg_ship_free(ptr));
|
|
2070
|
+
const ShipFinalization = new FinalizationRegistry(ptr => wasm.__wbg_ship_free(ptr >>> 0));
|
|
2036
2071
|
/**
|
|
2037
2072
|
*/
|
|
2038
2073
|
class Ship {
|
|
2039
2074
|
|
|
2040
2075
|
static __wrap(ptr) {
|
|
2076
|
+
ptr = ptr >>> 0;
|
|
2041
2077
|
const obj = Object.create(Ship.prototype);
|
|
2042
|
-
obj.
|
|
2043
|
-
ShipFinalization.register(obj, obj.
|
|
2078
|
+
obj.__wbg_ptr = ptr;
|
|
2079
|
+
ShipFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2044
2080
|
return obj;
|
|
2045
2081
|
}
|
|
2046
2082
|
|
|
2047
2083
|
__destroy_into_raw() {
|
|
2048
|
-
const ptr = this.
|
|
2049
|
-
this.
|
|
2084
|
+
const ptr = this.__wbg_ptr;
|
|
2085
|
+
this.__wbg_ptr = 0;
|
|
2050
2086
|
ShipFinalization.unregister(this);
|
|
2051
2087
|
return ptr;
|
|
2052
2088
|
}
|
|
@@ -2059,15 +2095,19 @@ class Ship {
|
|
|
2059
2095
|
* @returns {string}
|
|
2060
2096
|
*/
|
|
2061
2097
|
get id() {
|
|
2098
|
+
let deferred1_0;
|
|
2099
|
+
let deferred1_1;
|
|
2062
2100
|
try {
|
|
2063
2101
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2064
|
-
wasm.__wbg_get_ship_id(retptr, this.
|
|
2102
|
+
wasm.__wbg_get_ship_id(retptr, this.__wbg_ptr);
|
|
2065
2103
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2066
2104
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2105
|
+
deferred1_0 = r0;
|
|
2106
|
+
deferred1_1 = r1;
|
|
2067
2107
|
return getStringFromWasm0(r0, r1);
|
|
2068
2108
|
} finally {
|
|
2069
2109
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2070
|
-
wasm.__wbindgen_free(
|
|
2110
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2071
2111
|
}
|
|
2072
2112
|
}
|
|
2073
2113
|
/**
|
|
@@ -2076,180 +2116,180 @@ class Ship {
|
|
|
2076
2116
|
set id(arg0) {
|
|
2077
2117
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2078
2118
|
const len0 = WASM_VECTOR_LEN;
|
|
2079
|
-
wasm.__wbg_set_ship_id(this.
|
|
2119
|
+
wasm.__wbg_set_ship_id(this.__wbg_ptr, ptr0, len0);
|
|
2080
2120
|
}
|
|
2081
2121
|
/**
|
|
2082
2122
|
* @returns {bigint}
|
|
2083
2123
|
*/
|
|
2084
2124
|
get hash() {
|
|
2085
|
-
const ret = wasm.__wbg_get_ship_hash(this.
|
|
2125
|
+
const ret = wasm.__wbg_get_ship_hash(this.__wbg_ptr);
|
|
2086
2126
|
return BigInt.asUintN(64, ret);
|
|
2087
2127
|
}
|
|
2088
2128
|
/**
|
|
2089
2129
|
* @returns {number}
|
|
2090
2130
|
*/
|
|
2091
2131
|
get ship_id() {
|
|
2092
|
-
const ret = wasm.__wbg_get_ship_ship_id(this.
|
|
2132
|
+
const ret = wasm.__wbg_get_ship_ship_id(this.__wbg_ptr);
|
|
2093
2133
|
return ret;
|
|
2094
2134
|
}
|
|
2095
2135
|
/**
|
|
2096
2136
|
* @returns {number}
|
|
2097
2137
|
*/
|
|
2098
2138
|
get level() {
|
|
2099
|
-
const ret = wasm.__wbg_get_ship_level(this.
|
|
2139
|
+
const ret = wasm.__wbg_get_ship_level(this.__wbg_ptr);
|
|
2100
2140
|
return ret;
|
|
2101
2141
|
}
|
|
2102
2142
|
/**
|
|
2103
2143
|
* @returns {number}
|
|
2104
2144
|
*/
|
|
2105
2145
|
get current_hp() {
|
|
2106
|
-
const ret = wasm.__wbg_get_ship_current_hp(this.
|
|
2146
|
+
const ret = wasm.__wbg_get_ship_current_hp(this.__wbg_ptr);
|
|
2107
2147
|
return ret;
|
|
2108
2148
|
}
|
|
2109
2149
|
/**
|
|
2110
2150
|
* @returns {number}
|
|
2111
2151
|
*/
|
|
2112
2152
|
get morale() {
|
|
2113
|
-
const ret = wasm.__wbg_get_ship_morale(this.
|
|
2153
|
+
const ret = wasm.__wbg_get_ship_morale(this.__wbg_ptr);
|
|
2114
2154
|
return ret;
|
|
2115
2155
|
}
|
|
2116
2156
|
/**
|
|
2117
2157
|
* @returns {number}
|
|
2118
2158
|
*/
|
|
2119
2159
|
get ammo() {
|
|
2120
|
-
const ret = wasm.__wbg_get_ship_ammo(this.
|
|
2160
|
+
const ret = wasm.__wbg_get_ship_ammo(this.__wbg_ptr);
|
|
2121
2161
|
return ret;
|
|
2122
2162
|
}
|
|
2123
2163
|
/**
|
|
2124
2164
|
* @returns {number}
|
|
2125
2165
|
*/
|
|
2126
2166
|
get fuel() {
|
|
2127
|
-
const ret = wasm.__wbg_get_ship_fuel(this.
|
|
2167
|
+
const ret = wasm.__wbg_get_ship_fuel(this.__wbg_ptr);
|
|
2128
2168
|
return ret;
|
|
2129
2169
|
}
|
|
2130
2170
|
/**
|
|
2131
2171
|
* @returns {ShipType}
|
|
2132
2172
|
*/
|
|
2133
2173
|
get ship_type() {
|
|
2134
|
-
const ret = wasm.__wbg_get_ship_ship_type(this.
|
|
2174
|
+
const ret = wasm.__wbg_get_ship_ship_type(this.__wbg_ptr);
|
|
2135
2175
|
return takeObject(ret);
|
|
2136
2176
|
}
|
|
2137
2177
|
/**
|
|
2138
2178
|
* @returns {number}
|
|
2139
2179
|
*/
|
|
2140
2180
|
get ctype() {
|
|
2141
|
-
const ret = wasm.__wbg_get_ship_ctype(this.
|
|
2181
|
+
const ret = wasm.__wbg_get_ship_ctype(this.__wbg_ptr);
|
|
2142
2182
|
return ret;
|
|
2143
2183
|
}
|
|
2144
2184
|
/**
|
|
2145
2185
|
* @returns {SlotSizeVec}
|
|
2146
2186
|
*/
|
|
2147
2187
|
get slots() {
|
|
2148
|
-
const ret = wasm.__wbg_get_ship_slots(this.
|
|
2188
|
+
const ret = wasm.__wbg_get_ship_slots(this.__wbg_ptr);
|
|
2149
2189
|
return takeObject(ret);
|
|
2150
2190
|
}
|
|
2151
2191
|
/**
|
|
2152
2192
|
* @param {SlotSizeVec} arg0
|
|
2153
2193
|
*/
|
|
2154
2194
|
set slots(arg0) {
|
|
2155
|
-
wasm.__wbg_set_ship_slots(this.
|
|
2195
|
+
wasm.__wbg_set_ship_slots(this.__wbg_ptr, addHeapObject(arg0));
|
|
2156
2196
|
}
|
|
2157
2197
|
/**
|
|
2158
2198
|
* @returns {number | undefined}
|
|
2159
2199
|
*/
|
|
2160
2200
|
get naked_firepower() {
|
|
2161
|
-
const ret = wasm.ship_naked_firepower(this.
|
|
2201
|
+
const ret = wasm.ship_naked_firepower(this.__wbg_ptr);
|
|
2162
2202
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2163
2203
|
}
|
|
2164
2204
|
/**
|
|
2165
2205
|
* @returns {number | undefined}
|
|
2166
2206
|
*/
|
|
2167
2207
|
get naked_torpedo() {
|
|
2168
|
-
const ret = wasm.ship_naked_torpedo(this.
|
|
2208
|
+
const ret = wasm.ship_naked_torpedo(this.__wbg_ptr);
|
|
2169
2209
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2170
2210
|
}
|
|
2171
2211
|
/**
|
|
2172
2212
|
* @returns {number | undefined}
|
|
2173
2213
|
*/
|
|
2174
2214
|
get naked_armor() {
|
|
2175
|
-
const ret = wasm.ship_naked_armor(this.
|
|
2215
|
+
const ret = wasm.ship_naked_armor(this.__wbg_ptr);
|
|
2176
2216
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2177
2217
|
}
|
|
2178
2218
|
/**
|
|
2179
2219
|
* @returns {number | undefined}
|
|
2180
2220
|
*/
|
|
2181
2221
|
get naked_anti_air() {
|
|
2182
|
-
const ret = wasm.ship_naked_anti_air(this.
|
|
2222
|
+
const ret = wasm.ship_naked_anti_air(this.__wbg_ptr);
|
|
2183
2223
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2184
2224
|
}
|
|
2185
2225
|
/**
|
|
2186
2226
|
* @returns {number | undefined}
|
|
2187
2227
|
*/
|
|
2188
2228
|
get naked_evasion() {
|
|
2189
|
-
const ret = wasm.ship_naked_evasion(this.
|
|
2229
|
+
const ret = wasm.ship_naked_evasion(this.__wbg_ptr);
|
|
2190
2230
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2191
2231
|
}
|
|
2192
2232
|
/**
|
|
2193
2233
|
* @returns {number | undefined}
|
|
2194
2234
|
*/
|
|
2195
2235
|
get naked_asw() {
|
|
2196
|
-
const ret = wasm.ship_naked_asw(this.
|
|
2236
|
+
const ret = wasm.ship_naked_asw(this.__wbg_ptr);
|
|
2197
2237
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2198
2238
|
}
|
|
2199
2239
|
/**
|
|
2200
2240
|
* @returns {number | undefined}
|
|
2201
2241
|
*/
|
|
2202
2242
|
get naked_los() {
|
|
2203
|
-
const ret = wasm.ship_naked_los(this.
|
|
2243
|
+
const ret = wasm.ship_naked_los(this.__wbg_ptr);
|
|
2204
2244
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2205
2245
|
}
|
|
2206
2246
|
/**
|
|
2207
2247
|
* @returns {number | undefined}
|
|
2208
2248
|
*/
|
|
2209
2249
|
get firepower() {
|
|
2210
|
-
const ret = wasm.ship_firepower(this.
|
|
2250
|
+
const ret = wasm.ship_firepower(this.__wbg_ptr);
|
|
2211
2251
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2212
2252
|
}
|
|
2213
2253
|
/**
|
|
2214
2254
|
* @returns {number | undefined}
|
|
2215
2255
|
*/
|
|
2216
2256
|
get torpedo() {
|
|
2217
|
-
const ret = wasm.ship_torpedo(this.
|
|
2257
|
+
const ret = wasm.ship_torpedo(this.__wbg_ptr);
|
|
2218
2258
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2219
2259
|
}
|
|
2220
2260
|
/**
|
|
2221
2261
|
* @returns {number | undefined}
|
|
2222
2262
|
*/
|
|
2223
2263
|
get armor() {
|
|
2224
|
-
const ret = wasm.ship_armor(this.
|
|
2264
|
+
const ret = wasm.ship_armor(this.__wbg_ptr);
|
|
2225
2265
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2226
2266
|
}
|
|
2227
2267
|
/**
|
|
2228
2268
|
* @returns {number | undefined}
|
|
2229
2269
|
*/
|
|
2230
2270
|
get anti_air() {
|
|
2231
|
-
const ret = wasm.ship_anti_air(this.
|
|
2271
|
+
const ret = wasm.ship_anti_air(this.__wbg_ptr);
|
|
2232
2272
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2233
2273
|
}
|
|
2234
2274
|
/**
|
|
2235
2275
|
* @returns {number | undefined}
|
|
2236
2276
|
*/
|
|
2237
2277
|
get evasion() {
|
|
2238
|
-
const ret = wasm.ship_evasion(this.
|
|
2278
|
+
const ret = wasm.ship_evasion(this.__wbg_ptr);
|
|
2239
2279
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2240
2280
|
}
|
|
2241
2281
|
/**
|
|
2242
2282
|
* @returns {number | undefined}
|
|
2243
2283
|
*/
|
|
2244
2284
|
get asw() {
|
|
2245
|
-
const ret = wasm.ship_asw(this.
|
|
2285
|
+
const ret = wasm.ship_asw(this.__wbg_ptr);
|
|
2246
2286
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2247
2287
|
}
|
|
2248
2288
|
/**
|
|
2249
2289
|
* @returns {number | undefined}
|
|
2250
2290
|
*/
|
|
2251
2291
|
get los() {
|
|
2252
|
-
const ret = wasm.ship_los(this.
|
|
2292
|
+
const ret = wasm.ship_los(this.__wbg_ptr);
|
|
2253
2293
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2254
2294
|
}
|
|
2255
2295
|
/**
|
|
@@ -2266,121 +2306,129 @@ class Ship {
|
|
|
2266
2306
|
eq_id(id) {
|
|
2267
2307
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2268
2308
|
const len0 = WASM_VECTOR_LEN;
|
|
2269
|
-
const ret = wasm.ship_eq_id(this.
|
|
2309
|
+
const ret = wasm.ship_eq_id(this.__wbg_ptr, ptr0, len0);
|
|
2270
2310
|
return ret !== 0;
|
|
2271
2311
|
}
|
|
2272
2312
|
/**
|
|
2273
2313
|
* @returns {ShipState}
|
|
2274
2314
|
*/
|
|
2275
2315
|
state() {
|
|
2276
|
-
const ret = wasm.ship_state(this.
|
|
2316
|
+
const ret = wasm.ship_state(this.__wbg_ptr);
|
|
2277
2317
|
return takeObject(ret);
|
|
2278
2318
|
}
|
|
2279
2319
|
/**
|
|
2280
2320
|
* @returns {CustomPowerModifiers}
|
|
2281
2321
|
*/
|
|
2282
2322
|
custom_power_mods() {
|
|
2283
|
-
const ret = wasm.ship_custom_power_mods(this.
|
|
2323
|
+
const ret = wasm.ship_custom_power_mods(this.__wbg_ptr);
|
|
2284
2324
|
return takeObject(ret);
|
|
2285
2325
|
}
|
|
2286
2326
|
/**
|
|
2287
2327
|
* @returns {ShipMeta}
|
|
2288
2328
|
*/
|
|
2289
2329
|
meta() {
|
|
2290
|
-
const ret = wasm.ship_meta(this.
|
|
2330
|
+
const ret = wasm.ship_meta(this.__wbg_ptr);
|
|
2291
2331
|
return takeObject(ret);
|
|
2292
2332
|
}
|
|
2293
2333
|
/**
|
|
2294
2334
|
* @returns {string}
|
|
2295
2335
|
*/
|
|
2296
2336
|
get name() {
|
|
2337
|
+
let deferred1_0;
|
|
2338
|
+
let deferred1_1;
|
|
2297
2339
|
try {
|
|
2298
2340
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2299
|
-
wasm.ship_name(retptr, this.
|
|
2341
|
+
wasm.ship_name(retptr, this.__wbg_ptr);
|
|
2300
2342
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2301
2343
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2344
|
+
deferred1_0 = r0;
|
|
2345
|
+
deferred1_1 = r1;
|
|
2302
2346
|
return getStringFromWasm0(r0, r1);
|
|
2303
2347
|
} finally {
|
|
2304
2348
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2305
|
-
wasm.__wbindgen_free(
|
|
2349
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2306
2350
|
}
|
|
2307
2351
|
}
|
|
2308
2352
|
/**
|
|
2309
2353
|
* @returns {string}
|
|
2310
2354
|
*/
|
|
2311
2355
|
get yomi() {
|
|
2356
|
+
let deferred1_0;
|
|
2357
|
+
let deferred1_1;
|
|
2312
2358
|
try {
|
|
2313
2359
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2314
|
-
wasm.ship_yomi(retptr, this.
|
|
2360
|
+
wasm.ship_yomi(retptr, this.__wbg_ptr);
|
|
2315
2361
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2316
2362
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2363
|
+
deferred1_0 = r0;
|
|
2364
|
+
deferred1_1 = r1;
|
|
2317
2365
|
return getStringFromWasm0(r0, r1);
|
|
2318
2366
|
} finally {
|
|
2319
2367
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2320
|
-
wasm.__wbindgen_free(
|
|
2368
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2321
2369
|
}
|
|
2322
2370
|
}
|
|
2323
2371
|
/**
|
|
2324
2372
|
* @returns {number}
|
|
2325
2373
|
*/
|
|
2326
2374
|
get stype() {
|
|
2327
|
-
const ret = wasm.ship_stype(this.
|
|
2375
|
+
const ret = wasm.ship_stype(this.__wbg_ptr);
|
|
2328
2376
|
return ret;
|
|
2329
2377
|
}
|
|
2330
2378
|
/**
|
|
2331
2379
|
* @returns {number}
|
|
2332
2380
|
*/
|
|
2333
2381
|
get sort_id() {
|
|
2334
|
-
const ret = wasm.ship_sort_id(this.
|
|
2382
|
+
const ret = wasm.ship_sort_id(this.__wbg_ptr);
|
|
2335
2383
|
return ret;
|
|
2336
2384
|
}
|
|
2337
2385
|
/**
|
|
2338
2386
|
* @returns {number}
|
|
2339
2387
|
*/
|
|
2340
2388
|
remodel_rank() {
|
|
2341
|
-
const ret = wasm.ship_remodel_rank(this.
|
|
2389
|
+
const ret = wasm.ship_remodel_rank(this.__wbg_ptr);
|
|
2342
2390
|
return ret;
|
|
2343
2391
|
}
|
|
2344
2392
|
/**
|
|
2345
2393
|
* @returns {number}
|
|
2346
2394
|
*/
|
|
2347
2395
|
get slotnum() {
|
|
2348
|
-
const ret = wasm.ship_slotnum(this.
|
|
2396
|
+
const ret = wasm.ship_slotnum(this.__wbg_ptr);
|
|
2349
2397
|
return ret >>> 0;
|
|
2350
2398
|
}
|
|
2351
2399
|
/**
|
|
2352
2400
|
* @returns {number}
|
|
2353
2401
|
*/
|
|
2354
2402
|
get next_id() {
|
|
2355
|
-
const ret = wasm.ship_next_id(this.
|
|
2403
|
+
const ret = wasm.ship_next_id(this.__wbg_ptr);
|
|
2356
2404
|
return ret;
|
|
2357
2405
|
}
|
|
2358
2406
|
/**
|
|
2359
2407
|
* @returns {boolean}
|
|
2360
2408
|
*/
|
|
2361
2409
|
get useful() {
|
|
2362
|
-
const ret = wasm.ship_useful(this.
|
|
2410
|
+
const ret = wasm.ship_useful(this.__wbg_ptr);
|
|
2363
2411
|
return ret !== 0;
|
|
2364
2412
|
}
|
|
2365
2413
|
/**
|
|
2366
2414
|
* @returns {DamageState}
|
|
2367
2415
|
*/
|
|
2368
2416
|
damage_state() {
|
|
2369
|
-
const ret = wasm.ship_damage_state(this.
|
|
2417
|
+
const ret = wasm.ship_damage_state(this.__wbg_ptr);
|
|
2370
2418
|
return takeObject(ret);
|
|
2371
2419
|
}
|
|
2372
2420
|
/**
|
|
2373
2421
|
* @returns {MoraleState}
|
|
2374
2422
|
*/
|
|
2375
2423
|
morale_state() {
|
|
2376
|
-
const ret = wasm.ship_morale_state(this.
|
|
2424
|
+
const ret = wasm.ship_morale_state(this.__wbg_ptr);
|
|
2377
2425
|
return takeObject(ret);
|
|
2378
2426
|
}
|
|
2379
2427
|
/**
|
|
2380
2428
|
* @returns {ShipCategory}
|
|
2381
2429
|
*/
|
|
2382
2430
|
category() {
|
|
2383
|
-
const ret = wasm.ship_category(this.
|
|
2431
|
+
const ret = wasm.ship_category(this.__wbg_ptr);
|
|
2384
2432
|
return takeObject(ret);
|
|
2385
2433
|
}
|
|
2386
2434
|
/**
|
|
@@ -2388,7 +2436,7 @@ class Ship {
|
|
|
2388
2436
|
* @returns {boolean}
|
|
2389
2437
|
*/
|
|
2390
2438
|
has_attr(attr) {
|
|
2391
|
-
const ret = wasm.ship_has_attr(this.
|
|
2439
|
+
const ret = wasm.ship_has_attr(this.__wbg_ptr, addHeapObject(attr));
|
|
2392
2440
|
return ret !== 0;
|
|
2393
2441
|
}
|
|
2394
2442
|
/**
|
|
@@ -2397,12 +2445,12 @@ class Ship {
|
|
|
2397
2445
|
gear_keys() {
|
|
2398
2446
|
try {
|
|
2399
2447
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2400
|
-
wasm.ship_gear_keys(retptr, this.
|
|
2448
|
+
wasm.ship_gear_keys(retptr, this.__wbg_ptr);
|
|
2401
2449
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2402
2450
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2403
|
-
var
|
|
2451
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
2404
2452
|
wasm.__wbindgen_free(r0, r1 * 4);
|
|
2405
|
-
return
|
|
2453
|
+
return v1;
|
|
2406
2454
|
} finally {
|
|
2407
2455
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2408
2456
|
}
|
|
@@ -2414,7 +2462,7 @@ class Ship {
|
|
|
2414
2462
|
get_gear(key) {
|
|
2415
2463
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2416
2464
|
const len0 = WASM_VECTOR_LEN;
|
|
2417
|
-
const ret = wasm.ship_get_gear(this.
|
|
2465
|
+
const ret = wasm.ship_get_gear(this.__wbg_ptr, ptr0, len0);
|
|
2418
2466
|
return ret === 0 ? undefined : Gear.__wrap(ret);
|
|
2419
2467
|
}
|
|
2420
2468
|
/**
|
|
@@ -2422,7 +2470,7 @@ class Ship {
|
|
|
2422
2470
|
* @returns {number | undefined}
|
|
2423
2471
|
*/
|
|
2424
2472
|
get_damage_bound(state) {
|
|
2425
|
-
const ret = wasm.ship_get_damage_bound(this.
|
|
2473
|
+
const ret = wasm.ship_get_damage_bound(this.__wbg_ptr, addHeapObject(state));
|
|
2426
2474
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2427
2475
|
}
|
|
2428
2476
|
/**
|
|
@@ -2431,7 +2479,7 @@ class Ship {
|
|
|
2431
2479
|
* @returns {number}
|
|
2432
2480
|
*/
|
|
2433
2481
|
get_remaining_fuel(rate, ceil) {
|
|
2434
|
-
const ret = wasm.ship_get_remaining_fuel(this.
|
|
2482
|
+
const ret = wasm.ship_get_remaining_fuel(this.__wbg_ptr, rate, ceil);
|
|
2435
2483
|
return ret;
|
|
2436
2484
|
}
|
|
2437
2485
|
/**
|
|
@@ -2440,7 +2488,7 @@ class Ship {
|
|
|
2440
2488
|
* @returns {number}
|
|
2441
2489
|
*/
|
|
2442
2490
|
get_remaining_ammo(rate, ceil) {
|
|
2443
|
-
const ret = wasm.ship_get_remaining_ammo(this.
|
|
2491
|
+
const ret = wasm.ship_get_remaining_ammo(this.__wbg_ptr, rate, ceil);
|
|
2444
2492
|
return ret;
|
|
2445
2493
|
}
|
|
2446
2494
|
/**
|
|
@@ -2450,7 +2498,7 @@ class Ship {
|
|
|
2450
2498
|
has_unknown_stat(key) {
|
|
2451
2499
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2452
2500
|
const len0 = WASM_VECTOR_LEN;
|
|
2453
|
-
const ret = wasm.ship_has_unknown_stat(this.
|
|
2501
|
+
const ret = wasm.ship_has_unknown_stat(this.__wbg_ptr, ptr0, len0);
|
|
2454
2502
|
return ret !== 0;
|
|
2455
2503
|
}
|
|
2456
2504
|
/**
|
|
@@ -2460,7 +2508,7 @@ class Ship {
|
|
|
2460
2508
|
get_naked_stat(key) {
|
|
2461
2509
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2462
2510
|
const len0 = WASM_VECTOR_LEN;
|
|
2463
|
-
const ret = wasm.ship_get_naked_stat(this.
|
|
2511
|
+
const ret = wasm.ship_get_naked_stat(this.__wbg_ptr, ptr0, len0);
|
|
2464
2512
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2465
2513
|
}
|
|
2466
2514
|
/**
|
|
@@ -2470,7 +2518,7 @@ class Ship {
|
|
|
2470
2518
|
get_stat_interval_left(key) {
|
|
2471
2519
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2472
2520
|
const len0 = WASM_VECTOR_LEN;
|
|
2473
|
-
const ret = wasm.ship_get_stat_interval_left(this.
|
|
2521
|
+
const ret = wasm.ship_get_stat_interval_left(this.__wbg_ptr, ptr0, len0);
|
|
2474
2522
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2475
2523
|
}
|
|
2476
2524
|
/**
|
|
@@ -2480,7 +2528,7 @@ class Ship {
|
|
|
2480
2528
|
get_stat_interval_right(key) {
|
|
2481
2529
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2482
2530
|
const len0 = WASM_VECTOR_LEN;
|
|
2483
|
-
const ret = wasm.ship_get_stat_interval_right(this.
|
|
2531
|
+
const ret = wasm.ship_get_stat_interval_right(this.__wbg_ptr, ptr0, len0);
|
|
2484
2532
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2485
2533
|
}
|
|
2486
2534
|
/**
|
|
@@ -2490,7 +2538,7 @@ class Ship {
|
|
|
2490
2538
|
get_gear_stat(key) {
|
|
2491
2539
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2492
2540
|
const len0 = WASM_VECTOR_LEN;
|
|
2493
|
-
const ret = wasm.ship_get_gear_stat(this.
|
|
2541
|
+
const ret = wasm.ship_get_gear_stat(this.__wbg_ptr, ptr0, len0);
|
|
2494
2542
|
return ret;
|
|
2495
2543
|
}
|
|
2496
2544
|
/**
|
|
@@ -2500,7 +2548,7 @@ class Ship {
|
|
|
2500
2548
|
get_ebonus(key) {
|
|
2501
2549
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2502
2550
|
const len0 = WASM_VECTOR_LEN;
|
|
2503
|
-
const ret = wasm.ship_get_ebonus(this.
|
|
2551
|
+
const ret = wasm.ship_get_ebonus(this.__wbg_ptr, ptr0, len0);
|
|
2504
2552
|
return ret;
|
|
2505
2553
|
}
|
|
2506
2554
|
/**
|
|
@@ -2510,28 +2558,28 @@ class Ship {
|
|
|
2510
2558
|
get_stat_mod(key) {
|
|
2511
2559
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2512
2560
|
const len0 = WASM_VECTOR_LEN;
|
|
2513
|
-
const ret = wasm.ship_get_stat_mod(this.
|
|
2561
|
+
const ret = wasm.ship_get_stat_mod(this.__wbg_ptr, ptr0, len0);
|
|
2514
2562
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2515
2563
|
}
|
|
2516
2564
|
/**
|
|
2517
2565
|
* @returns {boolean}
|
|
2518
2566
|
*/
|
|
2519
2567
|
is_abyssal() {
|
|
2520
|
-
const ret = wasm.ship_is_abyssal(this.
|
|
2568
|
+
const ret = wasm.ship_is_abyssal(this.__wbg_ptr);
|
|
2521
2569
|
return ret !== 0;
|
|
2522
2570
|
}
|
|
2523
2571
|
/**
|
|
2524
2572
|
* @returns {boolean}
|
|
2525
2573
|
*/
|
|
2526
2574
|
is_submarine() {
|
|
2527
|
-
const ret = wasm.ship_is_submarine(this.
|
|
2575
|
+
const ret = wasm.ship_is_submarine(this.__wbg_ptr);
|
|
2528
2576
|
return ret !== 0;
|
|
2529
2577
|
}
|
|
2530
2578
|
/**
|
|
2531
2579
|
* @returns {boolean}
|
|
2532
2580
|
*/
|
|
2533
2581
|
is_amagiri() {
|
|
2534
|
-
const ret = wasm.ship_is_amagiri(this.
|
|
2582
|
+
const ret = wasm.ship_is_amagiri(this.__wbg_ptr);
|
|
2535
2583
|
return ret !== 0;
|
|
2536
2584
|
}
|
|
2537
2585
|
/**
|
|
@@ -2543,105 +2591,105 @@ class Ship {
|
|
|
2543
2591
|
_assertClass(gear, Gear);
|
|
2544
2592
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2545
2593
|
const len0 = WASM_VECTOR_LEN;
|
|
2546
|
-
const ret = wasm.ship_can_equip(this.
|
|
2594
|
+
const ret = wasm.ship_can_equip(this.__wbg_ptr, gear.__wbg_ptr, ptr0, len0);
|
|
2547
2595
|
return ret !== 0;
|
|
2548
2596
|
}
|
|
2549
2597
|
/**
|
|
2550
2598
|
* @returns {number | undefined}
|
|
2551
2599
|
*/
|
|
2552
2600
|
get max_hp() {
|
|
2553
|
-
const ret = wasm.ship_max_hp(this.
|
|
2601
|
+
const ret = wasm.ship_max_hp(this.__wbg_ptr);
|
|
2554
2602
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2555
2603
|
}
|
|
2556
2604
|
/**
|
|
2557
2605
|
* @returns {number}
|
|
2558
2606
|
*/
|
|
2559
2607
|
get max_ammo() {
|
|
2560
|
-
const ret = wasm.ship_max_ammo(this.
|
|
2608
|
+
const ret = wasm.ship_max_ammo(this.__wbg_ptr);
|
|
2561
2609
|
return ret;
|
|
2562
2610
|
}
|
|
2563
2611
|
/**
|
|
2564
2612
|
* @returns {number}
|
|
2565
2613
|
*/
|
|
2566
2614
|
get max_fuel() {
|
|
2567
|
-
const ret = wasm.ship_max_fuel(this.
|
|
2615
|
+
const ret = wasm.ship_max_fuel(this.__wbg_ptr);
|
|
2568
2616
|
return ret;
|
|
2569
2617
|
}
|
|
2570
2618
|
/**
|
|
2571
2619
|
* @returns {number | undefined}
|
|
2572
2620
|
*/
|
|
2573
2621
|
get naked_range() {
|
|
2574
|
-
const ret = wasm.ship_naked_range(this.
|
|
2622
|
+
const ret = wasm.ship_naked_range(this.__wbg_ptr);
|
|
2575
2623
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2576
2624
|
}
|
|
2577
2625
|
/**
|
|
2578
2626
|
* @returns {number}
|
|
2579
2627
|
*/
|
|
2580
2628
|
get naked_speed() {
|
|
2581
|
-
const ret = wasm.ship_naked_speed(this.
|
|
2629
|
+
const ret = wasm.ship_naked_speed(this.__wbg_ptr);
|
|
2582
2630
|
return ret;
|
|
2583
2631
|
}
|
|
2584
2632
|
/**
|
|
2585
2633
|
* @returns {number | undefined}
|
|
2586
2634
|
*/
|
|
2587
2635
|
get luck() {
|
|
2588
|
-
const ret = wasm.ship_luck(this.
|
|
2636
|
+
const ret = wasm.ship_luck(this.__wbg_ptr);
|
|
2589
2637
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2590
2638
|
}
|
|
2591
2639
|
/**
|
|
2592
2640
|
* @returns {number | undefined}
|
|
2593
2641
|
*/
|
|
2594
2642
|
get range() {
|
|
2595
|
-
const ret = wasm.ship_range(this.
|
|
2643
|
+
const ret = wasm.ship_range(this.__wbg_ptr);
|
|
2596
2644
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2597
2645
|
}
|
|
2598
2646
|
/**
|
|
2599
2647
|
* @returns {number}
|
|
2600
2648
|
*/
|
|
2601
2649
|
get speed() {
|
|
2602
|
-
const ret = wasm.ship_speed(this.
|
|
2650
|
+
const ret = wasm.ship_speed(this.__wbg_ptr);
|
|
2603
2651
|
return ret;
|
|
2604
2652
|
}
|
|
2605
2653
|
/**
|
|
2606
2654
|
* @returns {number}
|
|
2607
2655
|
*/
|
|
2608
2656
|
get accuracy() {
|
|
2609
|
-
const ret = wasm.ship_accuracy(this.
|
|
2657
|
+
const ret = wasm.ship_accuracy(this.__wbg_ptr);
|
|
2610
2658
|
return ret;
|
|
2611
2659
|
}
|
|
2612
2660
|
/**
|
|
2613
2661
|
* @returns {number}
|
|
2614
2662
|
*/
|
|
2615
2663
|
get innate_torpedo_accuracy() {
|
|
2616
|
-
const ret = wasm.ship_innate_torpedo_accuracy(this.
|
|
2664
|
+
const ret = wasm.ship_innate_torpedo_accuracy(this.__wbg_ptr);
|
|
2617
2665
|
return ret;
|
|
2618
2666
|
}
|
|
2619
2667
|
/**
|
|
2620
2668
|
* @returns {boolean}
|
|
2621
2669
|
*/
|
|
2622
2670
|
is_installation() {
|
|
2623
|
-
const ret = wasm.ship_is_installation(this.
|
|
2671
|
+
const ret = wasm.ship_is_installation(this.__wbg_ptr);
|
|
2624
2672
|
return ret !== 0;
|
|
2625
2673
|
}
|
|
2626
2674
|
/**
|
|
2627
2675
|
* @returns {boolean}
|
|
2628
2676
|
*/
|
|
2629
2677
|
is_pt_imp() {
|
|
2630
|
-
const ret = wasm.ship_is_pt_imp(this.
|
|
2678
|
+
const ret = wasm.ship_is_pt_imp(this.__wbg_ptr);
|
|
2631
2679
|
return ret !== 0;
|
|
2632
2680
|
}
|
|
2633
2681
|
/**
|
|
2634
2682
|
* @returns {SpecialEnemyType}
|
|
2635
2683
|
*/
|
|
2636
2684
|
special_enemy_type() {
|
|
2637
|
-
const ret = wasm.ship_special_enemy_type(this.
|
|
2685
|
+
const ret = wasm.ship_special_enemy_type(this.__wbg_ptr);
|
|
2638
2686
|
return takeObject(ret);
|
|
2639
2687
|
}
|
|
2640
2688
|
/**
|
|
2641
2689
|
* @returns {boolean}
|
|
2642
2690
|
*/
|
|
2643
2691
|
is_attackable_by_torpedo() {
|
|
2644
|
-
const ret = wasm.ship_is_attackable_by_torpedo(this.
|
|
2692
|
+
const ret = wasm.ship_is_attackable_by_torpedo(this.__wbg_ptr);
|
|
2645
2693
|
return ret !== 0;
|
|
2646
2694
|
}
|
|
2647
2695
|
/**
|
|
@@ -2649,7 +2697,7 @@ class Ship {
|
|
|
2649
2697
|
* @returns {number | undefined}
|
|
2650
2698
|
*/
|
|
2651
2699
|
get_slot_size(index) {
|
|
2652
|
-
const ret = wasm.ship_get_slot_size(this.
|
|
2700
|
+
const ret = wasm.ship_get_slot_size(this.__wbg_ptr, index);
|
|
2653
2701
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2654
2702
|
}
|
|
2655
2703
|
/**
|
|
@@ -2657,21 +2705,21 @@ class Ship {
|
|
|
2657
2705
|
* @returns {number | undefined}
|
|
2658
2706
|
*/
|
|
2659
2707
|
get_max_slot_size(index) {
|
|
2660
|
-
const ret = wasm.ship_get_max_slot_size(this.
|
|
2708
|
+
const ret = wasm.ship_get_max_slot_size(this.__wbg_ptr, index);
|
|
2661
2709
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
2662
2710
|
}
|
|
2663
2711
|
/**
|
|
2664
2712
|
* @returns {number}
|
|
2665
2713
|
*/
|
|
2666
2714
|
remaining_ammo_mod() {
|
|
2667
|
-
const ret = wasm.ship_remaining_ammo_mod(this.
|
|
2715
|
+
const ret = wasm.ship_remaining_ammo_mod(this.__wbg_ptr);
|
|
2668
2716
|
return ret;
|
|
2669
2717
|
}
|
|
2670
2718
|
/**
|
|
2671
2719
|
* @returns {number}
|
|
2672
2720
|
*/
|
|
2673
2721
|
remaining_fuel_mod() {
|
|
2674
|
-
const ret = wasm.ship_remaining_fuel_mod(this.
|
|
2722
|
+
const ret = wasm.ship_remaining_fuel_mod(this.__wbg_ptr);
|
|
2675
2723
|
return ret;
|
|
2676
2724
|
}
|
|
2677
2725
|
/**
|
|
@@ -2681,7 +2729,7 @@ class Ship {
|
|
|
2681
2729
|
fighter_power(air_type) {
|
|
2682
2730
|
try {
|
|
2683
2731
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2684
|
-
wasm.ship_fighter_power(retptr, this.
|
|
2732
|
+
wasm.ship_fighter_power(retptr, this.__wbg_ptr, addHeapObject(air_type));
|
|
2685
2733
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2686
2734
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2687
2735
|
return r0 === 0 ? undefined : r1;
|
|
@@ -2695,7 +2743,7 @@ class Ship {
|
|
|
2695
2743
|
fleet_los_factor() {
|
|
2696
2744
|
try {
|
|
2697
2745
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2698
|
-
wasm.ship_fleet_los_factor(retptr, this.
|
|
2746
|
+
wasm.ship_fleet_los_factor(retptr, this.__wbg_ptr);
|
|
2699
2747
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2700
2748
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2701
2749
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2711,7 +2759,7 @@ class Ship {
|
|
|
2711
2759
|
ship_adjusted_anti_air(side) {
|
|
2712
2760
|
try {
|
|
2713
2761
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2714
|
-
wasm.ship_ship_adjusted_anti_air(retptr, this.
|
|
2762
|
+
wasm.ship_ship_adjusted_anti_air(retptr, this.__wbg_ptr, addHeapObject(side));
|
|
2715
2763
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2716
2764
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2717
2765
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2724,14 +2772,14 @@ class Ship {
|
|
|
2724
2772
|
* @returns {number}
|
|
2725
2773
|
*/
|
|
2726
2774
|
fleet_anti_air_mod() {
|
|
2727
|
-
const ret = wasm.ship_fleet_anti_air_mod(this.
|
|
2775
|
+
const ret = wasm.ship_fleet_anti_air_mod(this.__wbg_ptr);
|
|
2728
2776
|
return ret;
|
|
2729
2777
|
}
|
|
2730
2778
|
/**
|
|
2731
2779
|
* @returns {number}
|
|
2732
2780
|
*/
|
|
2733
2781
|
cruiser_fit_bonus() {
|
|
2734
|
-
const ret = wasm.ship_cruiser_fit_bonus(this.
|
|
2782
|
+
const ret = wasm.ship_cruiser_fit_bonus(this.__wbg_ptr);
|
|
2735
2783
|
return ret;
|
|
2736
2784
|
}
|
|
2737
2785
|
/**
|
|
@@ -2740,7 +2788,7 @@ class Ship {
|
|
|
2740
2788
|
basic_accuracy_term() {
|
|
2741
2789
|
try {
|
|
2742
2790
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2743
|
-
wasm.ship_basic_accuracy_term(retptr, this.
|
|
2791
|
+
wasm.ship_basic_accuracy_term(retptr, this.__wbg_ptr);
|
|
2744
2792
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2745
2793
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2746
2794
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2754,7 +2802,7 @@ class Ship {
|
|
|
2754
2802
|
basic_evasion_term() {
|
|
2755
2803
|
try {
|
|
2756
2804
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2757
|
-
wasm.ship_basic_evasion_term(retptr, this.
|
|
2805
|
+
wasm.ship_basic_evasion_term(retptr, this.__wbg_ptr);
|
|
2758
2806
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2759
2807
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2760
2808
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2771,7 +2819,7 @@ class Ship {
|
|
|
2771
2819
|
evasion_term(formation_mod, postcap_additive, postcap_multiplicative) {
|
|
2772
2820
|
try {
|
|
2773
2821
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2774
|
-
wasm.ship_evasion_term(retptr, this.
|
|
2822
|
+
wasm.ship_evasion_term(retptr, this.__wbg_ptr, formation_mod, postcap_additive, postcap_multiplicative);
|
|
2775
2823
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2776
2824
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2777
2825
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2786,7 +2834,7 @@ class Ship {
|
|
|
2786
2834
|
basic_defense_power(armor_penetration) {
|
|
2787
2835
|
try {
|
|
2788
2836
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2789
|
-
wasm.ship_basic_defense_power(retptr, this.
|
|
2837
|
+
wasm.ship_basic_defense_power(retptr, this.__wbg_ptr, armor_penetration);
|
|
2790
2838
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2791
2839
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2792
2840
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2798,7 +2846,7 @@ class Ship {
|
|
|
2798
2846
|
* @returns {number}
|
|
2799
2847
|
*/
|
|
2800
2848
|
transport_point() {
|
|
2801
|
-
const ret = wasm.ship_transport_point(this.
|
|
2849
|
+
const ret = wasm.ship_transport_point(this.__wbg_ptr);
|
|
2802
2850
|
return ret;
|
|
2803
2851
|
}
|
|
2804
2852
|
/**
|
|
@@ -2808,7 +2856,7 @@ class Ship {
|
|
|
2808
2856
|
elos(node_divaricated_factor) {
|
|
2809
2857
|
try {
|
|
2810
2858
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2811
|
-
wasm.ship_elos(retptr, this.
|
|
2859
|
+
wasm.ship_elos(retptr, this.__wbg_ptr, node_divaricated_factor);
|
|
2812
2860
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2813
2861
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2814
2862
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2823,7 +2871,7 @@ class Ship {
|
|
|
2823
2871
|
ohko_power() {
|
|
2824
2872
|
try {
|
|
2825
2873
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2826
|
-
wasm.ship_ohko_power(retptr, this.
|
|
2874
|
+
wasm.ship_ohko_power(retptr, this.__wbg_ptr);
|
|
2827
2875
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2828
2876
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2829
2877
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2837,7 +2885,7 @@ class Ship {
|
|
|
2837
2885
|
state_day_gunfit_accuracy() {
|
|
2838
2886
|
try {
|
|
2839
2887
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2840
|
-
wasm.ship_state_day_gunfit_accuracy(retptr, this.
|
|
2888
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2841
2889
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2842
2890
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2843
2891
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2851,7 +2899,7 @@ class Ship {
|
|
|
2851
2899
|
state_night_gunfit_accuracy() {
|
|
2852
2900
|
try {
|
|
2853
2901
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2854
|
-
wasm.ship_state_night_gunfit_accuracy(retptr, this.
|
|
2902
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2855
2903
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2856
2904
|
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2857
2905
|
return r0 === 0 ? undefined : r2;
|
|
@@ -2865,7 +2913,7 @@ class Ship {
|
|
|
2865
2913
|
* @returns {number}
|
|
2866
2914
|
*/
|
|
2867
2915
|
gunfit_accuracy(is_night) {
|
|
2868
|
-
const ret = wasm.ship_gunfit_accuracy(this.
|
|
2916
|
+
const ret = wasm.ship_gunfit_accuracy(this.__wbg_ptr, is_night);
|
|
2869
2917
|
return ret;
|
|
2870
2918
|
}
|
|
2871
2919
|
}
|
|
@@ -2876,18 +2924,18 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
|
2876
2924
|
return addHeapObject(ret);
|
|
2877
2925
|
};
|
|
2878
2926
|
|
|
2927
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2928
|
+
takeObject(arg0);
|
|
2929
|
+
};
|
|
2930
|
+
|
|
2879
2931
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2880
2932
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
2881
2933
|
return addHeapObject(ret);
|
|
2882
2934
|
};
|
|
2883
2935
|
|
|
2884
|
-
module.exports.
|
|
2885
|
-
takeObject(arg0);
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2889
|
-
const ret = getObject(arg0) === undefined;
|
|
2890
|
-
return ret;
|
|
2936
|
+
module.exports.__wbg_createEquipmentBonuses_db4103b8842cdf39 = function(arg0, arg1) {
|
|
2937
|
+
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
2938
|
+
return addHeapObject(ret);
|
|
2891
2939
|
};
|
|
2892
2940
|
|
|
2893
2941
|
module.exports.__wbg_ship_new = function(arg0) {
|
|
@@ -2895,9 +2943,9 @@ module.exports.__wbg_ship_new = function(arg0) {
|
|
|
2895
2943
|
return addHeapObject(ret);
|
|
2896
2944
|
};
|
|
2897
2945
|
|
|
2898
|
-
module.exports.
|
|
2899
|
-
const ret =
|
|
2900
|
-
return
|
|
2946
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
2947
|
+
const ret = getObject(arg0) === undefined;
|
|
2948
|
+
return ret;
|
|
2901
2949
|
};
|
|
2902
2950
|
|
|
2903
2951
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
@@ -2907,29 +2955,25 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
|
2907
2955
|
|
|
2908
2956
|
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
2909
2957
|
const ret = getObject(arg1).stack;
|
|
2910
|
-
const
|
|
2911
|
-
const
|
|
2912
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
2913
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
2958
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2959
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2960
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
2961
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
2914
2962
|
};
|
|
2915
2963
|
|
|
2916
2964
|
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
2965
|
+
let deferred0_0;
|
|
2966
|
+
let deferred0_1;
|
|
2917
2967
|
try {
|
|
2968
|
+
deferred0_0 = arg0;
|
|
2969
|
+
deferred0_1 = arg1;
|
|
2918
2970
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
2919
2971
|
} finally {
|
|
2920
|
-
wasm.__wbindgen_free(
|
|
2972
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2921
2973
|
}
|
|
2922
2974
|
};
|
|
2923
2975
|
|
|
2924
|
-
module.exports.
|
|
2925
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2926
|
-
}, arguments) };
|
|
2927
|
-
|
|
2928
|
-
module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handleError(function (arg0, arg1) {
|
|
2929
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2930
|
-
}, arguments) };
|
|
2931
|
-
|
|
2932
|
-
module.exports.__wbg_crypto_70a96de3b6b73dac = function(arg0) {
|
|
2976
|
+
module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
2933
2977
|
const ret = getObject(arg0).crypto;
|
|
2934
2978
|
return addHeapObject(ret);
|
|
2935
2979
|
};
|
|
@@ -2940,17 +2984,17 @@ module.exports.__wbindgen_is_object = function(arg0) {
|
|
|
2940
2984
|
return ret;
|
|
2941
2985
|
};
|
|
2942
2986
|
|
|
2943
|
-
module.exports.
|
|
2987
|
+
module.exports.__wbg_process_298734cf255a885d = function(arg0) {
|
|
2944
2988
|
const ret = getObject(arg0).process;
|
|
2945
2989
|
return addHeapObject(ret);
|
|
2946
2990
|
};
|
|
2947
2991
|
|
|
2948
|
-
module.exports.
|
|
2992
|
+
module.exports.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
|
|
2949
2993
|
const ret = getObject(arg0).versions;
|
|
2950
2994
|
return addHeapObject(ret);
|
|
2951
2995
|
};
|
|
2952
2996
|
|
|
2953
|
-
module.exports.
|
|
2997
|
+
module.exports.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
|
|
2954
2998
|
const ret = getObject(arg0).node;
|
|
2955
2999
|
return addHeapObject(ret);
|
|
2956
3000
|
};
|
|
@@ -2960,12 +3004,12 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
2960
3004
|
return ret;
|
|
2961
3005
|
};
|
|
2962
3006
|
|
|
2963
|
-
module.exports.
|
|
3007
|
+
module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
|
|
2964
3008
|
const ret = getObject(arg0).msCrypto;
|
|
2965
3009
|
return addHeapObject(ret);
|
|
2966
3010
|
};
|
|
2967
3011
|
|
|
2968
|
-
module.exports.
|
|
3012
|
+
module.exports.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
|
|
2969
3013
|
const ret = module.require;
|
|
2970
3014
|
return addHeapObject(ret);
|
|
2971
3015
|
}, arguments) };
|
|
@@ -2975,17 +3019,25 @@ module.exports.__wbindgen_is_function = function(arg0) {
|
|
|
2975
3019
|
return ret;
|
|
2976
3020
|
};
|
|
2977
3021
|
|
|
2978
|
-
module.exports.
|
|
3022
|
+
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
|
|
3023
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
3024
|
+
}, arguments) };
|
|
3025
|
+
|
|
3026
|
+
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
3027
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
3028
|
+
}, arguments) };
|
|
3029
|
+
|
|
3030
|
+
module.exports.__wbg_new_898a68150f225f2e = function() {
|
|
2979
3031
|
const ret = new Array();
|
|
2980
3032
|
return addHeapObject(ret);
|
|
2981
3033
|
};
|
|
2982
3034
|
|
|
2983
|
-
module.exports.
|
|
3035
|
+
module.exports.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
|
|
2984
3036
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2985
3037
|
return addHeapObject(ret);
|
|
2986
3038
|
};
|
|
2987
3039
|
|
|
2988
|
-
module.exports.
|
|
3040
|
+
module.exports.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
|
|
2989
3041
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
2990
3042
|
return addHeapObject(ret);
|
|
2991
3043
|
}, arguments) };
|
|
@@ -2993,77 +3045,77 @@ module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(fun
|
|
|
2993
3045
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
2994
3046
|
const obj = getObject(arg1);
|
|
2995
3047
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2996
|
-
var
|
|
2997
|
-
var
|
|
2998
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
2999
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
3048
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3049
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3050
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
3051
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
3000
3052
|
};
|
|
3001
3053
|
|
|
3002
|
-
module.exports.
|
|
3054
|
+
module.exports.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
|
|
3003
3055
|
const ret = self.self;
|
|
3004
3056
|
return addHeapObject(ret);
|
|
3005
3057
|
}, arguments) };
|
|
3006
3058
|
|
|
3007
|
-
module.exports.
|
|
3059
|
+
module.exports.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
|
|
3008
3060
|
const ret = window.window;
|
|
3009
3061
|
return addHeapObject(ret);
|
|
3010
3062
|
}, arguments) };
|
|
3011
3063
|
|
|
3012
|
-
module.exports.
|
|
3064
|
+
module.exports.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
|
|
3013
3065
|
const ret = globalThis.globalThis;
|
|
3014
3066
|
return addHeapObject(ret);
|
|
3015
3067
|
}, arguments) };
|
|
3016
3068
|
|
|
3017
|
-
module.exports.
|
|
3069
|
+
module.exports.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
|
|
3018
3070
|
const ret = global.global;
|
|
3019
3071
|
return addHeapObject(ret);
|
|
3020
3072
|
}, arguments) };
|
|
3021
3073
|
|
|
3022
|
-
module.exports.
|
|
3074
|
+
module.exports.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
|
|
3023
3075
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
3024
3076
|
return ret;
|
|
3025
3077
|
};
|
|
3026
3078
|
|
|
3027
|
-
module.exports.
|
|
3079
|
+
module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3028
3080
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
3029
3081
|
return addHeapObject(ret);
|
|
3030
3082
|
}, arguments) };
|
|
3031
3083
|
|
|
3032
|
-
module.exports.
|
|
3084
|
+
module.exports.__wbg_buffer_085ec1f694018c4f = function(arg0) {
|
|
3033
3085
|
const ret = getObject(arg0).buffer;
|
|
3034
3086
|
return addHeapObject(ret);
|
|
3035
3087
|
};
|
|
3036
3088
|
|
|
3037
|
-
module.exports.
|
|
3089
|
+
module.exports.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
|
|
3038
3090
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
3039
3091
|
return addHeapObject(ret);
|
|
3040
3092
|
};
|
|
3041
3093
|
|
|
3042
|
-
module.exports.
|
|
3094
|
+
module.exports.__wbg_new_8125e318e6245eed = function(arg0) {
|
|
3043
3095
|
const ret = new Uint8Array(getObject(arg0));
|
|
3044
3096
|
return addHeapObject(ret);
|
|
3045
3097
|
};
|
|
3046
3098
|
|
|
3047
|
-
module.exports.
|
|
3099
|
+
module.exports.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
|
|
3048
3100
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3049
3101
|
};
|
|
3050
3102
|
|
|
3051
|
-
module.exports.
|
|
3103
|
+
module.exports.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
|
|
3052
3104
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
3053
3105
|
return addHeapObject(ret);
|
|
3054
3106
|
};
|
|
3055
3107
|
|
|
3056
|
-
module.exports.
|
|
3108
|
+
module.exports.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
|
|
3057
3109
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3058
3110
|
return addHeapObject(ret);
|
|
3059
3111
|
};
|
|
3060
3112
|
|
|
3061
|
-
module.exports.
|
|
3113
|
+
module.exports.__wbg_parse_670c19d4e984792e = function() { return handleError(function (arg0, arg1) {
|
|
3062
3114
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
3063
3115
|
return addHeapObject(ret);
|
|
3064
3116
|
}, arguments) };
|
|
3065
3117
|
|
|
3066
|
-
module.exports.
|
|
3118
|
+
module.exports.__wbg_stringify_e25465938f3f611f = function() { return handleError(function (arg0) {
|
|
3067
3119
|
const ret = JSON.stringify(getObject(arg0));
|
|
3068
3120
|
return addHeapObject(ret);
|
|
3069
3121
|
}, arguments) };
|