fleethub-core 0.5.0 → 0.7.3
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/bindings.d.ts +4 -1
- package/node/fh_core.d.ts +72 -83
- package/node/fh_core.js +204 -211
- package/node/fh_core_bg.wasm +0 -0
- package/node/fh_core_bg.wasm.d.ts +33 -31
- package/package.json +1 -1
- package/pkg/fh_core.d.ts +72 -83
- package/pkg/fh_core_bg.js +203 -211
- package/pkg/fh_core_bg.wasm +0 -0
- package/pkg/fh_core_bg.wasm.d.ts +33 -31
package/node/fh_core.js
CHANGED
|
@@ -9,20 +9,6 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
let heap_next = heap.length;
|
|
13
|
-
|
|
14
|
-
function dropObject(idx) {
|
|
15
|
-
if (idx < 36) return;
|
|
16
|
-
heap[idx] = heap_next;
|
|
17
|
-
heap_next = idx;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function takeObject(idx) {
|
|
21
|
-
const ret = getObject(idx);
|
|
22
|
-
dropObject(idx);
|
|
23
|
-
return ret;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
12
|
let WASM_VECTOR_LEN = 0;
|
|
27
13
|
|
|
28
14
|
let cachegetUint8Memory0 = null;
|
|
@@ -94,6 +80,20 @@ function getInt32Memory0() {
|
|
|
94
80
|
return cachegetInt32Memory0;
|
|
95
81
|
}
|
|
96
82
|
|
|
83
|
+
let heap_next = heap.length;
|
|
84
|
+
|
|
85
|
+
function dropObject(idx) {
|
|
86
|
+
if (idx < 36) return;
|
|
87
|
+
heap[idx] = heap_next;
|
|
88
|
+
heap_next = idx;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function takeObject(idx) {
|
|
92
|
+
const ret = getObject(idx);
|
|
93
|
+
dropObject(idx);
|
|
94
|
+
return ret;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
97
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
98
98
|
|
|
99
99
|
cachedTextDecoder.decode();
|
|
@@ -175,6 +175,11 @@ function debugString(val) {
|
|
|
175
175
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
176
176
|
return className;
|
|
177
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
*/
|
|
180
|
+
module.exports.set_panic_hook = function() {
|
|
181
|
+
wasm.set_panic_hook();
|
|
182
|
+
};
|
|
178
183
|
|
|
179
184
|
function _assertClass(instance, klass) {
|
|
180
185
|
if (!(instance instanceof klass)) {
|
|
@@ -221,11 +226,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
221
226
|
}
|
|
222
227
|
return result;
|
|
223
228
|
}
|
|
224
|
-
/**
|
|
225
|
-
*/
|
|
226
|
-
module.exports.set_panic_hook = function() {
|
|
227
|
-
wasm.set_panic_hook();
|
|
228
|
-
};
|
|
229
229
|
|
|
230
230
|
let cachegetUint16Memory0 = null;
|
|
231
231
|
function getUint16Memory0() {
|
|
@@ -235,8 +235,11 @@ function getUint16Memory0() {
|
|
|
235
235
|
return cachegetUint16Memory0;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
function
|
|
239
|
-
|
|
238
|
+
function passArray16ToWasm0(arg, malloc) {
|
|
239
|
+
const ptr = malloc(arg.length * 2);
|
|
240
|
+
getUint16Memory0().set(arg, ptr / 2);
|
|
241
|
+
WASM_VECTOR_LEN = arg.length;
|
|
242
|
+
return ptr;
|
|
240
243
|
}
|
|
241
244
|
/**
|
|
242
245
|
* @param {bindings.OrgType} org_type
|
|
@@ -274,15 +277,12 @@ module.exports.org_type_side = function(org_type) {
|
|
|
274
277
|
return takeObject(ret);
|
|
275
278
|
};
|
|
276
279
|
|
|
277
|
-
function
|
|
278
|
-
return
|
|
280
|
+
function getArrayU16FromWasm0(ptr, len) {
|
|
281
|
+
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
279
282
|
}
|
|
280
283
|
|
|
281
|
-
function
|
|
282
|
-
|
|
283
|
-
getUint16Memory0().set(arg, ptr / 2);
|
|
284
|
-
WASM_VECTOR_LEN = arg.length;
|
|
285
|
-
return ptr;
|
|
284
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
285
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
function handleError(f, args) {
|
|
@@ -425,6 +425,96 @@ class AirSquadron {
|
|
|
425
425
|
}
|
|
426
426
|
module.exports.AirSquadron = AirSquadron;
|
|
427
427
|
|
|
428
|
+
const AnalyzerFinalization = new FinalizationRegistry(ptr => wasm.__wbg_analyzer_free(ptr));
|
|
429
|
+
/**
|
|
430
|
+
*/
|
|
431
|
+
class Analyzer {
|
|
432
|
+
|
|
433
|
+
static __wrap(ptr) {
|
|
434
|
+
const obj = Object.create(Analyzer.prototype);
|
|
435
|
+
obj.ptr = ptr;
|
|
436
|
+
AnalyzerFinalization.register(obj, obj.ptr, obj);
|
|
437
|
+
return obj;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
__destroy_into_raw() {
|
|
441
|
+
const ptr = this.ptr;
|
|
442
|
+
this.ptr = 0;
|
|
443
|
+
AnalyzerFinalization.unregister(this);
|
|
444
|
+
return ptr;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
free() {
|
|
448
|
+
const ptr = this.__destroy_into_raw();
|
|
449
|
+
wasm.__wbg_analyzer_free(ptr);
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* @param {Comp} comp
|
|
453
|
+
* @param {bindings.Formation} formation
|
|
454
|
+
* @param {number | undefined} adjusted_anti_air_resist
|
|
455
|
+
* @param {number | undefined} fleet_anti_air_resist
|
|
456
|
+
* @param {number | undefined} aaci
|
|
457
|
+
* @returns {bindings.CompAntiAirInfo}
|
|
458
|
+
*/
|
|
459
|
+
analyze_anti_air(comp, formation, adjusted_anti_air_resist, fleet_anti_air_resist, aaci) {
|
|
460
|
+
_assertClass(comp, Comp);
|
|
461
|
+
var ret = wasm.analyzer_analyze_anti_air(this.ptr, comp.ptr, addHeapObject(formation), !isLikeNone(adjusted_anti_air_resist), isLikeNone(adjusted_anti_air_resist) ? 0 : adjusted_anti_air_resist, !isLikeNone(fleet_anti_air_resist), isLikeNone(fleet_anti_air_resist) ? 0 : fleet_anti_air_resist, isLikeNone(aaci) ? 0xFFFFFF : aaci);
|
|
462
|
+
return takeObject(ret);
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @param {Comp} comp
|
|
466
|
+
* @returns {bindings.CompDayCutinRateInfo}
|
|
467
|
+
*/
|
|
468
|
+
analyze_day_cutin(comp) {
|
|
469
|
+
_assertClass(comp, Comp);
|
|
470
|
+
var ret = wasm.analyzer_analyze_day_cutin(this.ptr, comp.ptr);
|
|
471
|
+
return takeObject(ret);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* @param {Comp} comp
|
|
475
|
+
* @param {bindings.NightSituation} attacker_situation
|
|
476
|
+
* @param {bindings.NightSituation} target_situation
|
|
477
|
+
* @returns {bindings.FleetNightCutinRateInfo}
|
|
478
|
+
*/
|
|
479
|
+
analyze_night_cutin(comp, attacker_situation, target_situation) {
|
|
480
|
+
_assertClass(comp, Comp);
|
|
481
|
+
var ret = wasm.analyzer_analyze_night_cutin(this.ptr, comp.ptr, addHeapObject(attacker_situation), addHeapObject(target_situation));
|
|
482
|
+
return takeObject(ret);
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* @param {Comp} comp
|
|
486
|
+
* @returns {bindings.CompContactChanceInfo}
|
|
487
|
+
*/
|
|
488
|
+
analyze_contact_chance(comp) {
|
|
489
|
+
_assertClass(comp, Comp);
|
|
490
|
+
var ret = wasm.analyzer_analyze_contact_chance(this.ptr, comp.ptr);
|
|
491
|
+
return takeObject(ret);
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* @param {bindings.WarfareAnalyzerContext} params
|
|
495
|
+
* @param {Ship} attacker
|
|
496
|
+
* @param {Ship} target
|
|
497
|
+
* @returns {bindings.WarfareInfo}
|
|
498
|
+
*/
|
|
499
|
+
analyze_warfare(params, attacker, target) {
|
|
500
|
+
_assertClass(attacker, Ship);
|
|
501
|
+
_assertClass(target, Ship);
|
|
502
|
+
var ret = wasm.analyzer_analyze_warfare(this.ptr, addHeapObject(params), attacker.ptr, target.ptr);
|
|
503
|
+
return takeObject(ret);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* @param {Comp} comp
|
|
507
|
+
* @param {bindings.Engagement} engagement
|
|
508
|
+
* @returns {bindings.FleetCutinAnalysis}
|
|
509
|
+
*/
|
|
510
|
+
analyze_fleet_cutin(comp, engagement) {
|
|
511
|
+
_assertClass(comp, Comp);
|
|
512
|
+
var ret = wasm.analyzer_analyze_fleet_cutin(this.ptr, comp.ptr, addHeapObject(engagement));
|
|
513
|
+
return takeObject(ret);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
module.exports.Analyzer = Analyzer;
|
|
517
|
+
|
|
428
518
|
const CompFinalization = new FinalizationRegistry(ptr => wasm.__wbg_comp_free(ptr));
|
|
429
519
|
/**
|
|
430
520
|
*/
|
|
@@ -462,6 +552,18 @@ class Comp {
|
|
|
462
552
|
}
|
|
463
553
|
/**
|
|
464
554
|
*/
|
|
555
|
+
get hq_level() {
|
|
556
|
+
var ret = wasm.__wbg_get_comp_hq_level(this.ptr);
|
|
557
|
+
return ret;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @param {number} arg0
|
|
561
|
+
*/
|
|
562
|
+
set hq_level(arg0) {
|
|
563
|
+
wasm.__wbg_set_comp_hq_level(this.ptr, arg0);
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
*/
|
|
465
567
|
get main() {
|
|
466
568
|
var ret = wasm.__wbg_get_comp_main(this.ptr);
|
|
467
569
|
return Fleet.__wrap(ret);
|
|
@@ -530,6 +632,13 @@ class Comp {
|
|
|
530
632
|
wasm.__wbg_set_comp_boss_sup(this.ptr, ptr0);
|
|
531
633
|
}
|
|
532
634
|
/**
|
|
635
|
+
* @returns {bindings.Side}
|
|
636
|
+
*/
|
|
637
|
+
side() {
|
|
638
|
+
var ret = wasm.comp_side(this.ptr);
|
|
639
|
+
return takeObject(ret);
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
533
642
|
* @returns {boolean}
|
|
534
643
|
*/
|
|
535
644
|
is_combined() {
|
|
@@ -649,14 +758,13 @@ class Comp {
|
|
|
649
758
|
}
|
|
650
759
|
/**
|
|
651
760
|
* マップ索敵
|
|
652
|
-
* @param {number} hq_level
|
|
653
761
|
* @param {number} node_divaricated_factor
|
|
654
762
|
* @returns {number | undefined}
|
|
655
763
|
*/
|
|
656
|
-
elos(
|
|
764
|
+
elos(node_divaricated_factor) {
|
|
657
765
|
try {
|
|
658
766
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
659
|
-
wasm.comp_elos(retptr, this.ptr,
|
|
767
|
+
wasm.comp_elos(retptr, this.ptr, node_divaricated_factor);
|
|
660
768
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
661
769
|
var r1 = getFloat64Memory0()[retptr / 8 + 1];
|
|
662
770
|
return r0 === 0 ? undefined : r1;
|
|
@@ -757,13 +865,15 @@ class FhCore {
|
|
|
757
865
|
/**
|
|
758
866
|
* @param {Uint16Array} main
|
|
759
867
|
* @param {Uint16Array | undefined} escort
|
|
868
|
+
* @returns {Comp}
|
|
760
869
|
*/
|
|
761
870
|
create_comp_by_map_enemy(main, escort) {
|
|
762
871
|
var ptr0 = passArray16ToWasm0(main, wasm.__wbindgen_malloc);
|
|
763
872
|
var len0 = WASM_VECTOR_LEN;
|
|
764
873
|
var ptr1 = isLikeNone(escort) ? 0 : passArray16ToWasm0(escort, wasm.__wbindgen_malloc);
|
|
765
874
|
var len1 = WASM_VECTOR_LEN;
|
|
766
|
-
wasm.fhcore_create_comp_by_map_enemy(this.ptr, ptr0, len0, ptr1, len1);
|
|
875
|
+
var ret = wasm.fhcore_create_comp_by_map_enemy(this.ptr, ptr0, len0, ptr1, len1);
|
|
876
|
+
return Comp.__wrap(ret);
|
|
767
877
|
}
|
|
768
878
|
/**
|
|
769
879
|
* @returns {Ship}
|
|
@@ -773,67 +883,11 @@ class FhCore {
|
|
|
773
883
|
return Ship.__wrap(ret);
|
|
774
884
|
}
|
|
775
885
|
/**
|
|
776
|
-
* @
|
|
777
|
-
* @param {bindings.Formation} formation
|
|
778
|
-
* @param {number | undefined} adjusted_anti_air_resist
|
|
779
|
-
* @param {number | undefined} fleet_anti_air_resist
|
|
780
|
-
* @returns {bindings.CompAntiAirInfo}
|
|
886
|
+
* @returns {Analyzer}
|
|
781
887
|
*/
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
return takeObject(ret);
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* @param {Comp} comp
|
|
789
|
-
* @returns {bindings.CompDayCutinRateInfo}
|
|
790
|
-
*/
|
|
791
|
-
analyze_day_cutin(comp) {
|
|
792
|
-
_assertClass(comp, Comp);
|
|
793
|
-
var ret = wasm.fhcore_analyze_day_cutin(this.ptr, comp.ptr);
|
|
794
|
-
return takeObject(ret);
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* @param {Comp} comp
|
|
798
|
-
* @param {bindings.NightSituation} attacker_situation
|
|
799
|
-
* @param {bindings.NightSituation} target_situation
|
|
800
|
-
* @returns {bindings.FleetNightCutinRateInfo}
|
|
801
|
-
*/
|
|
802
|
-
analyze_night_cutin(comp, attacker_situation, target_situation) {
|
|
803
|
-
_assertClass(comp, Comp);
|
|
804
|
-
var ret = wasm.fhcore_analyze_night_cutin(this.ptr, comp.ptr, addHeapObject(attacker_situation), addHeapObject(target_situation));
|
|
805
|
-
return takeObject(ret);
|
|
806
|
-
}
|
|
807
|
-
/**
|
|
808
|
-
* @param {Comp} comp
|
|
809
|
-
* @returns {bindings.CompContactChanceInfo}
|
|
810
|
-
*/
|
|
811
|
-
analyze_contact_chance(comp) {
|
|
812
|
-
_assertClass(comp, Comp);
|
|
813
|
-
var ret = wasm.fhcore_analyze_contact_chance(this.ptr, comp.ptr);
|
|
814
|
-
return takeObject(ret);
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* @param {bindings.WarfareAnalyzerContext} params
|
|
818
|
-
* @param {Ship} attacker
|
|
819
|
-
* @param {Ship} target
|
|
820
|
-
* @returns {bindings.WarfareInfo}
|
|
821
|
-
*/
|
|
822
|
-
analyze_warfare(params, attacker, target) {
|
|
823
|
-
_assertClass(attacker, Ship);
|
|
824
|
-
_assertClass(target, Ship);
|
|
825
|
-
var ret = wasm.fhcore_analyze_warfare(this.ptr, addHeapObject(params), attacker.ptr, target.ptr);
|
|
826
|
-
return takeObject(ret);
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* @param {Comp} comp
|
|
830
|
-
* @param {bindings.Engagement} engagement
|
|
831
|
-
* @returns {bindings.FleetCutinAnalysis}
|
|
832
|
-
*/
|
|
833
|
-
analyze_fleet_cutin(comp, engagement) {
|
|
834
|
-
_assertClass(comp, Comp);
|
|
835
|
-
var ret = wasm.fhcore_analyze_fleet_cutin(this.ptr, comp.ptr, addHeapObject(engagement));
|
|
836
|
-
return takeObject(ret);
|
|
888
|
+
create_analyzer() {
|
|
889
|
+
var ret = wasm.fhcore_create_analyzer(this.ptr);
|
|
890
|
+
return Analyzer.__wrap(ret);
|
|
837
891
|
}
|
|
838
892
|
/**
|
|
839
893
|
* @param {Comp} player
|
|
@@ -1643,11 +1697,11 @@ class Gear {
|
|
|
1643
1697
|
return ret !== 0;
|
|
1644
1698
|
}
|
|
1645
1699
|
/**
|
|
1646
|
-
* @param {
|
|
1700
|
+
* @param {bindings.AirStateRank} rank
|
|
1647
1701
|
* @returns {number}
|
|
1648
1702
|
*/
|
|
1649
|
-
contact_selection_rate(
|
|
1650
|
-
var ret = wasm.gear_contact_selection_rate(this.ptr,
|
|
1703
|
+
contact_selection_rate(rank) {
|
|
1704
|
+
var ret = wasm.gear_contact_selection_rate(this.ptr, addHeapObject(rank));
|
|
1651
1705
|
return ret;
|
|
1652
1706
|
}
|
|
1653
1707
|
/**
|
|
@@ -1684,6 +1738,13 @@ class Gear {
|
|
|
1684
1738
|
/**
|
|
1685
1739
|
* @returns {boolean}
|
|
1686
1740
|
*/
|
|
1741
|
+
is_abyssal() {
|
|
1742
|
+
var ret = wasm.gear_is_abyssal(this.ptr);
|
|
1743
|
+
return ret !== 0;
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* @returns {boolean}
|
|
1747
|
+
*/
|
|
1687
1748
|
is_abyssal_cuttlefish_torpedo() {
|
|
1688
1749
|
var ret = wasm.gear_is_abyssal_cuttlefish_torpedo(this.ptr);
|
|
1689
1750
|
return ret !== 0;
|
|
@@ -1987,6 +2048,28 @@ class Org {
|
|
|
1987
2048
|
}
|
|
1988
2049
|
/**
|
|
1989
2050
|
*/
|
|
2051
|
+
get sortie() {
|
|
2052
|
+
try {
|
|
2053
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2054
|
+
wasm.__wbg_get_org_sortie(retptr, this.ptr);
|
|
2055
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2056
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2057
|
+
return getStringFromWasm0(r0, r1);
|
|
2058
|
+
} finally {
|
|
2059
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2060
|
+
wasm.__wbindgen_free(r0, r1);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* @param {string} arg0
|
|
2065
|
+
*/
|
|
2066
|
+
set sortie(arg0) {
|
|
2067
|
+
var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2068
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2069
|
+
wasm.__wbg_set_org_sortie(this.ptr, ptr0, len0);
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
*/
|
|
1990
2073
|
get route_sup() {
|
|
1991
2074
|
try {
|
|
1992
2075
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -2101,43 +2184,6 @@ class Org {
|
|
|
2101
2184
|
}
|
|
2102
2185
|
/**
|
|
2103
2186
|
* @param {bindings.Role} role
|
|
2104
|
-
* @returns {(string)[]}
|
|
2105
|
-
*/
|
|
2106
|
-
ship_keys(role) {
|
|
2107
|
-
try {
|
|
2108
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2109
|
-
wasm.org_ship_keys(retptr, this.ptr, addHeapObject(role));
|
|
2110
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2111
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2112
|
-
var v0 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
2113
|
-
wasm.__wbindgen_free(r0, r1 * 4);
|
|
2114
|
-
return v0;
|
|
2115
|
-
} finally {
|
|
2116
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
/**
|
|
2120
|
-
* @param {bindings.Role} role
|
|
2121
|
-
* @returns {(string)[] | undefined}
|
|
2122
|
-
*/
|
|
2123
|
-
sortie_ship_keys(role) {
|
|
2124
|
-
try {
|
|
2125
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2126
|
-
wasm.org_sortie_ship_keys(retptr, this.ptr, addHeapObject(role));
|
|
2127
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2128
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2129
|
-
let v0;
|
|
2130
|
-
if (r0 !== 0) {
|
|
2131
|
-
v0 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
2132
|
-
wasm.__wbindgen_free(r0, r1 * 4);
|
|
2133
|
-
}
|
|
2134
|
-
return v0;
|
|
2135
|
-
} finally {
|
|
2136
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
/**
|
|
2140
|
-
* @param {bindings.Role} role
|
|
2141
2187
|
* @returns {number | undefined}
|
|
2142
2188
|
*/
|
|
2143
2189
|
fleet_los_mod(role) {
|
|
@@ -2231,6 +2277,13 @@ class Org {
|
|
|
2231
2277
|
}
|
|
2232
2278
|
}
|
|
2233
2279
|
/**
|
|
2280
|
+
* @returns {Comp}
|
|
2281
|
+
*/
|
|
2282
|
+
create_comp() {
|
|
2283
|
+
var ret = wasm.org_create_comp(this.ptr);
|
|
2284
|
+
return Comp.__wrap(ret);
|
|
2285
|
+
}
|
|
2286
|
+
/**
|
|
2234
2287
|
* @param {string} key
|
|
2235
2288
|
* @returns {Comp}
|
|
2236
2289
|
*/
|
|
@@ -2311,55 +2364,6 @@ class Org {
|
|
|
2311
2364
|
return ret !== 0;
|
|
2312
2365
|
}
|
|
2313
2366
|
/**
|
|
2314
|
-
* @returns {bindings.Formation}
|
|
2315
|
-
*/
|
|
2316
|
-
default_formation() {
|
|
2317
|
-
var ret = wasm.org_default_formation(this.ptr);
|
|
2318
|
-
return takeObject(ret);
|
|
2319
|
-
}
|
|
2320
|
-
/**
|
|
2321
|
-
* 艦隊対空値
|
|
2322
|
-
* @param {number} formation_mod
|
|
2323
|
-
* @returns {number}
|
|
2324
|
-
*/
|
|
2325
|
-
fleet_anti_air(formation_mod) {
|
|
2326
|
-
var ret = wasm.org_fleet_anti_air(this.ptr, formation_mod);
|
|
2327
|
-
return ret;
|
|
2328
|
-
}
|
|
2329
|
-
/**
|
|
2330
|
-
* 制空値
|
|
2331
|
-
* @param {boolean} anti_combined
|
|
2332
|
-
* @param {boolean} anti_lbas
|
|
2333
|
-
* @returns {number | undefined}
|
|
2334
|
-
*/
|
|
2335
|
-
fighter_power(anti_combined, anti_lbas) {
|
|
2336
|
-
try {
|
|
2337
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2338
|
-
wasm.org_fighter_power(retptr, this.ptr, anti_combined, anti_lbas);
|
|
2339
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2340
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2341
|
-
return r0 === 0 ? undefined : r1;
|
|
2342
|
-
} finally {
|
|
2343
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
|
-
/**
|
|
2347
|
-
* マップ索敵
|
|
2348
|
-
* @param {number} node_divaricated_factor
|
|
2349
|
-
* @returns {number | undefined}
|
|
2350
|
-
*/
|
|
2351
|
-
elos(node_divaricated_factor) {
|
|
2352
|
-
try {
|
|
2353
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2354
|
-
wasm.org_elos(retptr, this.ptr, node_divaricated_factor);
|
|
2355
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2356
|
-
var r1 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2357
|
-
return r0 === 0 ? undefined : r1;
|
|
2358
|
-
} finally {
|
|
2359
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
/**
|
|
2363
2367
|
* 防空時の基地制空値
|
|
2364
2368
|
* @returns {number}
|
|
2365
2369
|
*/
|
|
@@ -2376,17 +2380,6 @@ class Org {
|
|
|
2376
2380
|
return ret;
|
|
2377
2381
|
}
|
|
2378
2382
|
/**
|
|
2379
|
-
* 輸送物資量(TP)
|
|
2380
|
-
* @param {string} key
|
|
2381
|
-
* @returns {number}
|
|
2382
|
-
*/
|
|
2383
|
-
transport_point(key) {
|
|
2384
|
-
var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2385
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2386
|
-
var ret = wasm.org_transport_point(this.ptr, ptr0, len0);
|
|
2387
|
-
return ret;
|
|
2388
|
-
}
|
|
2389
|
-
/**
|
|
2390
2383
|
* @param {Ship} ship
|
|
2391
2384
|
* @param {bindings.Formation} formation
|
|
2392
2385
|
* @returns {bindings.WarfareShipEnvironment}
|
|
@@ -2668,7 +2661,7 @@ class Ship {
|
|
|
2668
2661
|
get xxh3() {
|
|
2669
2662
|
try {
|
|
2670
2663
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2671
|
-
wasm.
|
|
2664
|
+
wasm.org_xxh3(retptr, this.ptr);
|
|
2672
2665
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2673
2666
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2674
2667
|
return getStringFromWasm0(r0, r1);
|
|
@@ -3188,10 +3181,6 @@ class Ship {
|
|
|
3188
3181
|
}
|
|
3189
3182
|
module.exports.Ship = Ship;
|
|
3190
3183
|
|
|
3191
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3192
|
-
takeObject(arg0);
|
|
3193
|
-
};
|
|
3194
|
-
|
|
3195
3184
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
3196
3185
|
const obj = getObject(arg1);
|
|
3197
3186
|
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3201,6 +3190,10 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
3201
3190
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3202
3191
|
};
|
|
3203
3192
|
|
|
3193
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3194
|
+
takeObject(arg0);
|
|
3195
|
+
};
|
|
3196
|
+
|
|
3204
3197
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3205
3198
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
3206
3199
|
return addHeapObject(ret);
|
|
@@ -3211,6 +3204,10 @@ module.exports.__wbindgen_json_parse = function(arg0, arg1) {
|
|
|
3211
3204
|
return addHeapObject(ret);
|
|
3212
3205
|
};
|
|
3213
3206
|
|
|
3207
|
+
module.exports.__wbg_error_cc38ce2b4b661e1d = function(arg0) {
|
|
3208
|
+
console.error(getObject(arg0));
|
|
3209
|
+
};
|
|
3210
|
+
|
|
3214
3211
|
module.exports.__wbg_new_693216e109162396 = function() {
|
|
3215
3212
|
var ret = new Error();
|
|
3216
3213
|
return addHeapObject(ret);
|
|
@@ -3232,19 +3229,15 @@ module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) {
|
|
|
3232
3229
|
}
|
|
3233
3230
|
};
|
|
3234
3231
|
|
|
3235
|
-
module.exports.
|
|
3236
|
-
|
|
3237
|
-
};
|
|
3238
|
-
|
|
3239
|
-
module.exports.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
|
|
3240
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
3232
|
+
module.exports.__wbg_randomFillSync_59fcc2add91fe7b3 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3233
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
3241
3234
|
}, arguments) };
|
|
3242
3235
|
|
|
3243
|
-
module.exports.
|
|
3244
|
-
getObject(arg0).
|
|
3236
|
+
module.exports.__wbg_getRandomValues_3e46aa268da0fed1 = function() { return handleError(function (arg0, arg1) {
|
|
3237
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
3245
3238
|
}, arguments) };
|
|
3246
3239
|
|
|
3247
|
-
module.exports.
|
|
3240
|
+
module.exports.__wbg_process_f2b73829dbd321da = function(arg0) {
|
|
3248
3241
|
var ret = getObject(arg0).process;
|
|
3249
3242
|
return addHeapObject(ret);
|
|
3250
3243
|
};
|
|
@@ -3255,12 +3248,12 @@ module.exports.__wbindgen_is_object = function(arg0) {
|
|
|
3255
3248
|
return ret;
|
|
3256
3249
|
};
|
|
3257
3250
|
|
|
3258
|
-
module.exports.
|
|
3251
|
+
module.exports.__wbg_versions_cd82f79c98672a9f = function(arg0) {
|
|
3259
3252
|
var ret = getObject(arg0).versions;
|
|
3260
3253
|
return addHeapObject(ret);
|
|
3261
3254
|
};
|
|
3262
3255
|
|
|
3263
|
-
module.exports.
|
|
3256
|
+
module.exports.__wbg_node_ee3f6da4130bd35f = function(arg0) {
|
|
3264
3257
|
var ret = getObject(arg0).node;
|
|
3265
3258
|
return addHeapObject(ret);
|
|
3266
3259
|
};
|
|
@@ -3270,17 +3263,17 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
3270
3263
|
return ret;
|
|
3271
3264
|
};
|
|
3272
3265
|
|
|
3273
|
-
module.exports.
|
|
3266
|
+
module.exports.__wbg_modulerequire_0a83c0c31d12d2c7 = function() { return handleError(function (arg0, arg1) {
|
|
3274
3267
|
var ret = module.require(getStringFromWasm0(arg0, arg1));
|
|
3275
3268
|
return addHeapObject(ret);
|
|
3276
3269
|
}, arguments) };
|
|
3277
3270
|
|
|
3278
|
-
module.exports.
|
|
3271
|
+
module.exports.__wbg_crypto_9e3521ed42436d35 = function(arg0) {
|
|
3279
3272
|
var ret = getObject(arg0).crypto;
|
|
3280
3273
|
return addHeapObject(ret);
|
|
3281
3274
|
};
|
|
3282
3275
|
|
|
3283
|
-
module.exports.
|
|
3276
|
+
module.exports.__wbg_msCrypto_c429c3f8f7a70bb5 = function(arg0) {
|
|
3284
3277
|
var ret = getObject(arg0).msCrypto;
|
|
3285
3278
|
return addHeapObject(ret);
|
|
3286
3279
|
};
|
package/node/fh_core_bg.wasm
CHANGED
|
Binary file
|