summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_e_bee.cpp
blob: d20f176f20ba5989f79dc67cd7c2b3b58c5f12ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
/**
 * d_a_e_bee.cpp
 * Enemy - Bees
 */

#include "d/actor/d_a_e_bee.h"
#include "d/actor/d_a_e_nest.h"
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h"
#include "d/d_procname.h"
#include "SSystem/SComponent/c_math.h"

/* 80685638-8068563C 000008 0001+03 1/1 0/0 0/0 .bss             @1109 */
static u8 lit_1109[1 + 3 /* padding */];

/* 8068563C-80685640 00000C 0001+03 0/0 0/0 0/0 .bss             @1107 */
#pragma push
#pragma force_active on
static u8 lit_1107[1 + 3 /* padding */];
#pragma pop

/* 80685640-80685644 000010 0001+03 0/0 0/0 0/0 .bss             @1105 */
#pragma push
#pragma force_active on
static u8 lit_1105[1 + 3 /* padding */];
#pragma pop

/* 80685644-80685648 000014 0001+03 0/0 0/0 0/0 .bss             @1104 */
#pragma push
#pragma force_active on
static u8 lit_1104[1 + 3 /* padding */];
#pragma pop

/* 80685648-8068564C 000018 0001+03 0/0 0/0 0/0 .bss             @1099 */
#pragma push
#pragma force_active on
static u8 lit_1099[1 + 3 /* padding */];
#pragma pop

/* 8068564C-80685650 00001C 0001+03 0/0 0/0 0/0 .bss             @1097 */
#pragma push
#pragma force_active on
static u8 lit_1097[1 + 3 /* padding */];
#pragma pop

/* 80685650-80685654 000020 0001+03 0/0 0/0 0/0 .bss             @1095 */
#pragma push
#pragma force_active on
static u8 lit_1095[1 + 3 /* padding */];
#pragma pop

/* 80685654-80685658 000024 0001+03 0/0 0/0 0/0 .bss             @1094 */
#pragma push
#pragma force_active on
static u8 lit_1094[1 + 3 /* padding */];
#pragma pop

/* 80685658-8068565C 000028 0001+03 0/0 0/0 0/0 .bss             @1057 */
#pragma push
#pragma force_active on
static u8 lit_1057[1 + 3 /* padding */];
#pragma pop

/* 8068565C-80685660 00002C 0001+03 0/0 0/0 0/0 .bss             @1055 */
#pragma push
#pragma force_active on
static u8 lit_1055[1 + 3 /* padding */];
#pragma pop

/* 80685660-80685664 000030 0001+03 0/0 0/0 0/0 .bss             @1053 */
#pragma push
#pragma force_active on
static u8 lit_1053[1 + 3 /* padding */];
#pragma pop

/* 80685664-80685668 000034 0001+03 0/0 0/0 0/0 .bss             @1052 */
#pragma push
#pragma force_active on
static u8 lit_1052[1 + 3 /* padding */];
#pragma pop

/* 80685668-8068566C 000038 0001+03 0/0 0/0 0/0 .bss             @1014 */
#pragma push
#pragma force_active on
static u8 lit_1014[1 + 3 /* padding */];
#pragma pop

/* 8068566C-80685670 00003C 0001+03 0/0 0/0 0/0 .bss             @1012 */
#pragma push
#pragma force_active on
static u8 lit_1012[1 + 3 /* padding */];
#pragma pop

/* 80685670-80685674 000040 0001+03 0/0 0/0 0/0 .bss             @1010 */
#pragma push
#pragma force_active on
static u8 lit_1010[1 + 3 /* padding */];
#pragma pop

/* 80685674-80685678 -00001 0004+00 2/2 0/0 0/0 .bss             None */
/* 80685674 0001+00 data_80685674 @1009 */
/* 80685675 0003+00 data_80685675 None */
static u8 struct_80685674;
static bool hioInit;

/* 80685684-80685694 000054 0010+00 6/6 0/0 0/0 .bss             l_HIO */
static daE_Bee_HIO_c l_HIO;

/* 8068286C-8068289C 0000EC 0030+00 1/1 0/0 0/0 .text            __ct__13daE_Bee_HIO_cFv */
daE_Bee_HIO_c::daE_Bee_HIO_c() {
    field_0x4 = -1;
    mScale = 1.0f;
    mDelete = false;
    mNoKill = false;
}

/* 8068289C-806829A8 00011C 010C+00 1/0 0/0 0/0 .text            daE_Bee_Draw__FP11e_bee_class */
static int daE_Bee_Draw(e_bee_class* i_this) {
    g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
    bee_s* bee = i_this->mBees;
    int room_no = fopAcM_GetRoomNo(i_this);
    for (int i = 0; i < i_this->mNumBees; i++, bee++) {
        if (bee->mAction != bee_s::ACT_DEAD && !bee->mNoDraw) {
            if (bee->mIsFlying == 0) {
                if ((bee->mCounter & 4) != 0) {
                    dComIfGp_entrySimpleModel(bee->mpModel3, room_no);
                } else {
                    dComIfGp_entrySimpleModel(bee->mpModel4, room_no);
                }
            } else {
                if ((bee->mCounter & 1) != 0) {
                    dComIfGp_entrySimpleModel(bee->mpModel1, room_no);
                } else {
                    dComIfGp_entrySimpleModel(bee->mpModel2, room_no);
                }
            }
        }
    }
    return 1;
}

/* 806829A8-80682A70 000228 00C8+00 3/3 0/0 0/0 .text            bee_mtxset__FP5bee_s */
static void bee_mtxset(bee_s* i_bee) {
    mDoMtx_stack_c::transS(i_bee->mPos.x, i_bee->mPos.y, i_bee->mPos.z);
    mDoMtx_stack_c::YrotM(i_bee->mAngle.y);
    mDoMtx_stack_c::XrotM(i_bee->mAngle.x);
    mDoMtx_stack_c::ZrotM(i_bee->mAngle.z);
    f32 scale = l_HIO.mScale * i_bee->mScale;
    mDoMtx_stack_c::scaleM(scale, scale, scale);
    if ((i_bee->mCounter & 1) != 0) {
        i_bee->mpModel1->setBaseTRMtx(mDoMtx_stack_c::get());
    } else {
        i_bee->mpModel2->setBaseTRMtx(mDoMtx_stack_c::get());
    }
}

/* 80682A70-80682D78 0002F0 0308+00 1/1 0/0 0/0 .text            bee_ground_ang_set__FP5bee_s */
static void bee_ground_ang_set(bee_s* i_bee) {
    dBgS_LinChk lin_chk;
    cXyz vec4, vec2, vec3, vec1;
    vec1 = i_bee->mPos;
    vec1.y += 30.0f;
    mDoMtx_stack_c::transS(i_bee->mPos.x, i_bee->mPos.y, i_bee->mPos.z);
    mDoMtx_stack_c::transM(5.0f, -30.0f, 0.0f);
    mDoMtx_stack_c::multVecZero(&vec2);
    mDoMtx_stack_c::transM(-10.0f, 0.0f, 0.0f);
    mDoMtx_stack_c::multVecZero(&vec3);
    s8 bvar1 = false;
    lin_chk.Set(&vec1, &vec2, NULL);
    if (dComIfG_Bgsp().LineCross(&lin_chk)) {
        vec2 = lin_chk.GetCross();
        lin_chk.Set(&vec1, &vec3, NULL);
        if (dComIfG_Bgsp().LineCross(&lin_chk)) {
            vec3 = lin_chk.GetCross();
            bvar1 = true;
        }
    }
    if (bvar1) {
        vec4 = vec2 - vec3;
        i_bee->mAngle.z = cM_atan2s(vec4.y, JMAFastSqrt(vec4.x * vec4.x + vec4.z * vec4.z));
    }
    mDoMtx_stack_c::transM(5.0f, 0.0f, 5.0f);
    mDoMtx_stack_c::multVecZero(&vec2);
    mDoMtx_stack_c::transM(0.0f, 0.0f, -10.0f);
    mDoMtx_stack_c::multVecZero(&vec3);
    bvar1 = false;
    lin_chk.Set(&vec1, &vec2, NULL);
    if (dComIfG_Bgsp().LineCross(&lin_chk)) {
        vec2 = lin_chk.GetCross();
        lin_chk.Set(&vec1, &vec3, NULL);
        if (dComIfG_Bgsp().LineCross(&lin_chk)) {
            vec3 = lin_chk.GetCross();
            bvar1 = true;
        }
    }
    if (bvar1) {
        vec4 = vec2 - vec3;
        i_bee->mAngle.x = -cM_atan2s(vec4.y, JMAFastSqrt(vec4.x * vec4.x + vec4.z * vec4.z));
    }
}

/* 80685694-80685698 000064 0004+00 1/2 0/0 0/0 .bss             None */
static u8 ccCylSet;

/* 80682DB4-806835FC 000634 0848+00 1/1 0/0 0/0 .text bee_fly_action__FP11e_bee_classP5bee_s */
static int bee_fly_action(e_bee_class* i_this, bee_s* i_bee) {
    e_nest_class* nest = static_cast<e_nest_class*>(fopAcM_SearchByID(i_this->parentActorID));
    if (nest == NULL) {
        i_bee->mAction = bee_s::ACT_DEAD;
        return false;
    }

    fopAc_ac_c* hit_actor = fopAcM_SearchByID(nest->mHitActorID);
    if (hit_actor == NULL) {
        i_bee->mAction = bee_s::ACT_DEAD;
        return false;
    }

    int ret = false;
    i_bee->mIsFlying = 1;
    cXyz vec;
    
    if (i_bee->mAction == bee_s::ACT_FLY) {
        if (i_bee->mTimer == 0) {
            i_bee->mTimer = cM_rndF(15.0f) + 15.0f;
            i_bee->mTarget.x = cM_rndFX(100.0f);
            i_bee->mTarget.y = cM_rndFX(50.0f);
            i_bee->mTarget.z = cM_rndFX(100.0f);
            i_bee->mSpeedF = cM_rndF(5.0f) + 17.0f;
        }
        if (fopAcM_GetName(hit_actor) != PROC_ALINK) {
            vec = hit_actor->current.pos - i_bee->mPos;
            vec.y += 125.0f;
            vec += i_bee->mTarget;
            if (i_bee->mHomeTimer == 0) {
                if (fopAcM_GetName(hit_actor) == PROC_NPC_TK) {
                    i_bee->mAction = bee_s::ACT_DEAD;
                } else {
                    i_bee->mAction = bee_s::ACT_FLY_HOME_A;
                    i_bee->mSound.startSound(Z2SE_EN_BE_GO_HOME, 0, -1);
                }
            }
        } else {
            vec = hit_actor->current.pos - i_bee->mPos;
            vec.y += 150.0f;
            f32 dist = vec.abs();
            if (i_this->mCcSetTimer == 0 && dist < 40.0f) {
                i_this->mCcSph.SetC(i_bee->mPos);
            }
            if (dist < 300.0f) {
                daPy_getPlayerActorClass()->onBeeFollow();
            }
            vec += i_bee->mTarget;
            f32 home_check = 30.0f;
            if (i_this->mHomeTimer == 0) {
                if (i_bee->mHomeTimer > 10) {
                    i_bee->mHomeTimer = 10;
                }
                home_check = 10000.0f;
            }
            if (i_bee->mHomeTimer == 0) {
                if (nest != NULL && nest->mAction == e_nest_class::ACT_NORMAL) {
                    f32 dx = hit_actor->current.pos.x - i_bee->mPos.x;
                    f32 dz = hit_actor->current.pos.z - i_bee->mPos.z;
                    if (JMAFastSqrt(dx * dx + dz * dz) < home_check) {
                        i_bee->mAction = bee_s::ACT_FLY_HOME_A;
                        i_bee->mSound.startSound(Z2SE_EN_BE_GO_HOME, 0, -1);
                    }
                } else {
                    i_bee->mAction = bee_s::ACT_FLY_HOME_B;
                    i_bee->mSound.startSound(Z2SE_EN_BE_GO_HOME, 0, -1);
                }
            }
        }
        ret = true;
    } else if (i_bee->mAction == bee_s::ACT_FLY_HOME_A) {
        vec = i_this->home.pos - i_bee->mPos;
        f32 home_dist = vec.abs();
        f32 home_check = i_this->scale.x * 55.0f;
        if (home_check < 55.0f) {
            home_check = 55.0f;
        }
        if (home_dist < home_check) {
            i_bee->mAction = bee_s::ACT_HOME;
        } else {
            if (home_dist > 500.0f) {
                home_dist = 500.0f;
            }
            vec.x += home_dist * cM_ssin(i_bee->mCounter * 0x500);
            vec.y += home_dist * cM_scos(i_bee->mCounter * 0x400) * 0.5f;
            vec.z += home_dist * cM_scos(i_bee->mCounter * 0x600);
        }
    } else {
        vec = i_this->home.pos - i_bee->mPos;
        vec.y += 2000.0f;
        vec.x += cM_ssin(i_bee->mCounter * 0x170) * 2000.0f;
        vec.z += cM_scos(i_bee->mCounter * 0x130) * 2000.0f;
        if (i_bee->mPos.y - i_this->home.pos.y > 1500.0f) {
            i_bee->mAction = bee_s::ACT_DEAD;
        }
    }

    s16 angle_y = cM_ssin(i_bee->mCounter * 3500) * 1500.0f;
    s16 angle_x = cM_ssin(i_bee->mCounter * 3000) * 1500.0f;
    cLib_addCalcAngleS2(&i_bee->mAngle.y, angle_y + cM_atan2s(vec.x, vec.z), 1, 0x1000);
    f32 vec_xz = JMAFastSqrt(vec.x * vec.x + vec.z * vec.z);
    cLib_addCalcAngleS2(&i_bee->mAngle.x, angle_x - cM_atan2s(vec.y, vec_xz), 1, 0x1000);
    mDoMtx_YrotS(*calc_mtx, i_bee->mAngle.y);
    mDoMtx_XrotM(*calc_mtx, i_bee->mAngle.x);
    vec.x = 0.0f;
    vec.y = 0.0f;
    vec.z = i_bee->mSpeedF;
    MtxPosition(&vec, &i_bee->mSpeed);
    i_bee->mPos += i_bee->mSpeed;
    i_bee->mAngle.z = 0;
    bee_mtxset(i_bee);
    
    if (ccCylSet == 0) {
        ccCylSet += 1;
        cXyz cyl_center = i_bee->mPos;
        cyl_center.y -= 100.0f;
        i_this->mCcCyl.SetC(cyl_center);
        i_this->mCcCyl.SetH(200.0f);
        i_this->mCcCyl.SetR(500.0f);
    }

    if (i_bee->mHomeTimer != 0) {
        i_bee->mHomeTimer--;
    }
    return ret;
}

/* 806835FC-80683DDC 000E7C 07E0+00 1/1 0/0 0/0 .text bee_nest_action__FP11e_bee_classP5bee_sSc */
static void bee_nest_action(e_bee_class* i_this, bee_s* i_bee, s8 i_nestHealth) {
    i_bee->mIsFlying = 0;
    cXyz vec1 = i_bee->mTarget - i_bee->mPos;

    if (i_bee->mMode == 0) {
        if (i_bee->mTimer == 0) {
            if (cM_rndF(1.0f) < 0.02f) {
                i_bee->mTimer = cM_rndF(50.0f) + 30.0f;
                i_bee->mMode = 2;
            } else {
                i_bee->mTimer = cM_rndF(30.0f) + 15.0f;
                i_bee->mTarget.x = i_this->home.pos.x + cM_rndFX(200.0f);
                i_bee->mTarget.z = i_this->home.pos.z + cM_rndFX(200.0f);
                i_bee->mMode = 1;
            }
        }
        i_bee->mSpeedF = 0.0f;
    } else if (i_bee->mMode == 1) {
        i_bee->mCounter++;
        cLib_addCalcAngleS2(&i_bee->mAngle.y, cM_atan2s(vec1.x, vec1.z), 2, 0x400);
        if (i_bee->mTimer == 0 || vec1.abs() < 10.0f) {
            i_bee->mMode = 0;
            i_bee->mTimer = cM_rndF(15.0f) + 5.0f;
        }
        i_bee->mSpeedF = 2.0f;
    } else if (i_bee->mMode == 2) {
        i_bee->mIsFlying = 1;
        cLib_addCalc2(&i_bee->mStartDistance, 50.0f, 0.1f, 5.0f);
        cLib_addCalcAngleS2(&i_bee->mAngle.y, cM_atan2s(vec1.x, vec1.z), 2, 0x800);
        if ((i_bee->mTimer & 7) == 0) {
            i_bee->mTarget.x = i_this->home.pos.x + cM_rndFX(200.0f);
            i_bee->mTarget.z = i_this->home.pos.z + cM_rndFX(200.0f);
        }
        if (i_bee->mTimer == 0) {
            i_bee->mMode = 3;
        }
        i_bee->mSpeedF = 5.0f;
    } else if (i_bee->mMode == 3) {
        i_bee->mIsFlying = 1;
        cLib_addCalc0(&i_bee->mStartDistance, 1.0f, 5.0f);
        if (i_bee->mStartDistance <= 0.1f) {
            i_bee->mMode = 0;
        }
        i_bee->mSpeedF = 0.0f;
    }

    mDoMtx_YrotS(*calc_mtx, i_bee->mAngle.y);
    vec1.y = 0.0f;
    vec1.x = 0.0f;
    vec1.z = i_bee->mSpeedF;
    MtxPosition(&vec1, &i_bee->mSpeed);
    i_bee->mPos += i_bee->mSpeed;

    s16 angle_z = -(i_bee->mPos.x - i_this->home.pos.x) * 0x8000 / 200.0f;
    s16 angle_x = (i_bee->mPos.z - i_this->home.pos.z) * 0x8000 / 200.0f;
    vec1.y = i_this->scale.x * -51.0f - i_bee->mStartDistance;
    vec1.z = 0.0f;
    vec1.x = 0.0f;
    MtxScale(1.0f, 1.2f, 1.0f, 0);
    mDoMtx_ZrotM(*calc_mtx, angle_z);
    mDoMtx_XrotM(*calc_mtx, angle_x);
    cXyz pos;
    MtxPosition(&vec1, &pos);
    pos += i_this->home.pos;
    
    if (i_bee->mIsFlying == 0) {
        cLib_addCalcAngleS2(&i_bee->mAngle.x, angle_z, 2, 0x800);
        cLib_addCalcAngleS2(&i_bee->mAngle.z, angle_x, 2, 0x800);
    } else {
        i_bee->mCounter++;
        cLib_addCalcAngleS2(&i_bee->mAngle.x, 0, 1, 0x1000);
        cLib_addCalcAngleS2(&i_bee->mAngle.z, 0x8000, 1, 0x1000);
    }
    
    mDoMtx_stack_c::transS(pos.x, pos.y, pos.z);
    mDoMtx_stack_c::ZrotM(i_bee->mAngle.x);
    mDoMtx_stack_c::XrotM(i_bee->mAngle.z);
    mDoMtx_stack_c::YrotM(i_bee->mAngle.y);
    mDoMtx_stack_c::XrotM(0x8000);
    f32 scale = l_HIO.mScale * i_bee->mScale;
    mDoMtx_stack_c::scaleM(scale, scale, scale);

    if (i_bee->mIsFlying != 0) {
        if ((i_bee->mCounter & 1) != 0) {
            i_bee->mpModel1->setBaseTRMtx(mDoMtx_stack_c::get());
        } else {
            i_bee->mpModel2->setBaseTRMtx(mDoMtx_stack_c::get());
        }
    } else {
        if ((i_bee->mCounter & 4) != 0) {
            i_bee->mpModel3->setBaseTRMtx(mDoMtx_stack_c::get());
        } else {
            i_bee->mpModel4->setBaseTRMtx(mDoMtx_stack_c::get());
        }
    }

    if (i_nestHealth == 1) {
        i_bee->mAction = bee_s::ACT_FLY;
        i_bee->mPos = pos;
        i_bee->mTimer = cM_rndF(50.0f);
        i_bee->mSpeedF = 0.0f;
        i_bee->mMode = 0;
        i_bee->mStartDistance = 0.0f;
        i_bee->mHomeTimer = cM_rndF(100.0f) + 400.0f;
    } else if (i_nestHealth == 2) {
        i_bee->mAction = bee_s::ACT_START;
        i_bee->mPos = pos;
        i_bee->mTimer = cM_rndF(30.0f) + 20.0f;
    } else {
        fopAc_ac_c* nest = fopAcM_SearchByID(i_this->parentActorID);
        if (nest == NULL) {
            i_bee->mPos = pos;
            vec1 = i_bee->mPos - i_this->home.pos;
            i_bee->mAction = bee_s::ACT_FAIL;
            i_bee->mMode = 0;
            mDoMtx_YrotS(*calc_mtx, cM_atan2s(vec1.x, vec1.z));
            vec1.x = 0.0f;
            vec1.y = cM_rndF(10.0f) + 20.0f;
            vec1.z = cM_rndF(10.0f) + 20.0f;
            MtxPosition(&vec1, &i_bee->mSpeed);
            i_bee->mAngle.x = cM_rndF(0x10000);
            i_bee->mAngle.z = cM_rndF(0x10000);
            i_bee->mTimer = 0;
            i_bee->mIsFlying = 1;
            i_bee->mSound.startSound(Z2SE_EN_BE_DEATH, 0, -1);
        }
    }
}

/* 80683DDC-80683FF4 00165C 0218+00 1/1 0/0 0/0 .text            bee_fail__FP5bee_s */
static void bee_fail(bee_s* i_bee) {
    if (i_bee->mMode <= 1) {
        i_bee->mPos += i_bee->mSpeed;
        i_bee->mSpeed.y -= 3.0f;
        i_bee->mAngle.x += 0x2000;
        i_bee->mAngle.z += 0x1300;
        dBgS_GndChk gnd_chk;
        cXyz vec = i_bee->mPos;
        vec.y += 100.0f;
        gnd_chk.SetPos(&vec);
        f32 ground = dComIfG_Bgsp().GroundCross(&gnd_chk) + 3.0f;
        if (fabsf(ground - i_bee->mPos.y) > 1000.0f) {
            ground = i_bee->mPos.y;
        }
        if (i_bee->mPos.y <= ground) {
            i_bee->mPos.y = ground;
            if (i_bee->mMode == 0) {
                i_bee->mSpeed.y *= -(cM_rndF(0.1f) + 0.2f);
                i_bee->mSpeed.x *= cM_rndF(0.1f) + 0.3f;
                i_bee->mSpeed.z *= cM_rndF(0.1f) + 0.3f;
            } else {
                bee_ground_ang_set(i_bee);
                i_bee->mSpeed.y = 0.0f;
                if (!l_HIO.mNoKill) {
                    i_bee->mTimer = cM_rndF(15.0f) + 15.0f;
                } else {
                    i_bee->mAction = bee_s::ACT_FLY;
                }
            }
            i_bee->mMode++;
        }
    } else if (i_bee->mTimer == 0) {
        cLib_addCalc0(&i_bee->mScale, 1.0f, 0.1f);
        if (i_bee->mScale < 0.01f) {
            i_bee->mAction = bee_s::ACT_DEAD;
        }
    }
    bee_mtxset(i_bee);
}

/* 80683FF4-80684248 001874 0254+00 1/1 0/0 0/0 .text            bee_start__FP11e_bee_classP5bee_s
 */
static void bee_start(e_bee_class* i_this, bee_s* i_bee) {
    cXyz vec = i_this->home.pos - i_bee->mPos;
    vec.y += 30;
    s16 angle_y = cM_ssin(i_bee->mCounter * 4500) * 4000.0f;
    s16 angle_x = cM_ssin(i_bee->mCounter * 5500) * 4000.0f;
    cLib_addCalcAngleS2(&i_bee->mAngle.y, angle_y + cM_atan2s(vec.x, vec.z), 1, 0x1000);
    f32 vec_xz = JMAFastSqrt(vec.x * vec.x + vec.z * vec.z);
    cLib_addCalcAngleS2(&i_bee->mAngle.x, angle_x - cM_atan2s(vec.y, vec_xz), 1, 0x1000);
    i_bee->mCounter++;
    cLib_addCalcAngleS2(&i_bee->mAngle.z, 0x8000, 4, 0x400);
    i_bee->mSpeedF = 15.0f;
    mDoMtx_YrotS(*calc_mtx, i_bee->mAngle.y);
    mDoMtx_XrotM(*calc_mtx, i_bee->mAngle.x);
    vec.x = 0.0f;
    vec.y = 0.0f;
    vec.z = i_bee->mSpeedF;
    MtxPosition(&vec, &i_bee->mSpeed);
    i_bee->mPos += i_bee->mSpeed;

    if (i_bee->mTimer == 0) {
        e_nest_class* nest = static_cast<e_nest_class*>(fopAcM_SearchByID(i_this->parentActorID));
        if (nest != NULL && nest->mHawkHit != 0) {
            i_bee->mAction = bee_s::ACT_FLY_HOME_B;
            i_bee->mSpeedF = cM_rndF(5.0f) + 17.0f;
        } else {
            i_bee->mAction = bee_s::ACT_FLY;
            i_bee->mSpeedF = 0.0f;
            i_bee->mMode = 0;
            i_bee->mStartDistance = 0.0f;
            i_bee->mHomeTimer = cM_rndF(55.0f) + 200.0f;
        }
    }

    i_bee->mIsFlying = 1;
    bee_mtxset(i_bee);
}

/* 80684248-80684A94 001AC8 084C+00 1/1 0/0 0/0 .text            bee_control__FP11e_bee_class */
// NONMATCHING regalloc
static void bee_control(e_bee_class* i_this) {
    s8 nest_health = 0;

    static cXyz non(-20000.0f, 30000.0f, -15000.0f);
    i_this->mCcSph.SetC(i_this->current.pos + non);

    fopAc_ac_c* parent = fopAcM_SearchByID(i_this->parentActorID);
    e_nest_class* nest = NULL;
    if (parent != NULL) {
        if (parent != NULL && parent->health != 0) {
            nest_health = parent->health;
        }
        nest = static_cast<e_nest_class*>(parent);
        i_this->home.pos = nest->mCenterPos;
    }

    dComIfG_Ccsp()->Set(&i_this->mCcCyl);

    cXyz hit_pos;
    cXyz* hit_pos_p = NULL;
    f32 hit_radius = 120.0f;

    if (i_this->mCcCyl.ChkTgHit()) {
        hit_pos_p = &hit_pos;
        cCcD_Obj* hit_obj = i_this->mCcCyl.GetTgHitObj();
        if (hit_obj->ChkAtType(AT_TYPE_BOMB) || hit_obj->ChkAtType(AT_TYPE_BOOMERANG)
                                             || hit_obj->ChkAtType(AT_TYPE_IRON_BALL)) {
            fopAc_ac_c* hit_actor = dCc_GetAc(hit_obj->GetAc());
            if (hit_obj->ChkAtType(AT_TYPE_BOMB)) {
                hit_radius = 300.0f;
                hit_pos = hit_actor->current.pos;
            } else if (hit_obj->ChkAtType(AT_TYPE_IRON_BALL)) {
                hit_radius = 100.0f;
                daPy_py_c* player = static_cast<daPy_py_c*>(dComIfGp_getPlayer(0));
                cXyz* center = player->getIronBallCenterPos();
                if (center != NULL) {
                    hit_pos = *center;
                }
            } else {
                hit_pos = hit_actor->current.pos;
                hit_radius = 150.0f;
            }
        } else {
            cXyz vec1, vec2;
            daPy_py_c* player = daPy_getPlayerActorClass();
            if (cc_pl_cut_bit_get() == 0x80) {
                i_this->mBoomerangAngle += 0x1400;
                vec1.z = 150.0f;
            } else {
                vec1.z = 100.0f;
            }
            mDoMtx_YrotS(*calc_mtx, player->shape_angle.y + i_this->mBoomerangAngle);
            vec1.x = 0.0f;
            vec1.y = 100.0f;
            MtxPosition(&vec1, &vec2);
            hit_pos = player->current.pos + vec2;
        }
    } else {
        i_this->mBoomerangAngle = 0;
    }

    bee_s* bee = i_this->mBees;
    s8 active_bees = 0;
    ccCylSet = 0;
    s8 bees_in_nest = 0;
    s8 bees_flying = 0;
    camera_class* camera = dComIfGp_getCamera(0);

    if ((nest != NULL && nest->mDemoStage == 0 && dComIfGp_event_runCheck())
                    || !daPy_getPlayerActorClass()->checkSwimUp()
                    || dComIfGp_checkPlayerStatus0(0, 0x100000)
                    || dComIfGp_checkPlayerStatus0(0, 0x8000000)
                    || daPy_getPlayerActorClass()->checkCanoeRide()) {
        if (i_this->mHomeTimer != 0) {
            i_this->mHomeTimer--;
        }
    } else {
        i_this->mHomeTimer = 10;
    }

    for (int i = 0; i < i_this->mNumBees; i++, bee++) {
        if (bee->mAction != bee_s::ACT_DEAD) {
            bee->mNoDraw = false;
            active_bees++;
            cXyz vec3;
            
            if (dComIfGp_checkPlayerStatus0(0, 0x200000)) {
                vec3.x = bee->mPos.x - camera->lookat.eye.x;
                vec3.z = bee->mPos.z - camera->lookat.eye.z;
                if (JMAFastSqrt(vec3.x * vec3.x + vec3.z * vec3.z) > 2500.0f) {
                    bee->mNoDraw = true;
                }
            }

            if (bee->mTimer != 0) {
                bee->mTimer--;
            }

            if (bee->mAction == bee_s::ACT_HOME) {
                bee_nest_action(i_this, bee, nest_health);
                bees_in_nest++;
            } else if (bee->mAction <= bee_s::ACT_FLY_HOME_B) {
                bee->mCounter++;
                if (bee_fly_action(i_this, bee)) {
                    i_this->current.pos = bee->mPos;
                    bees_flying++;
                }
                if (hit_pos_p != NULL) {
                    vec3 = bee->mPos - *hit_pos_p;
                    if (vec3.abs() < hit_radius) {
                        bee->mAction = bee_s::ACT_FAIL;
                        bee->mMode = 0;
                        mDoMtx_YrotS(*calc_mtx, cM_atan2s(vec3.x, vec3.z));
                        vec3.x = 0.0f;
                        vec3.y = cM_rndF(10.0f) + 20.0f;
                        vec3.z = cM_rndF(10.0f) + 20.0f;
                        MtxPosition(&vec3, &bee->mSpeed);
                        bee->mAngle.x = cM_rndF(0x10000);
                        bee->mAngle.z = cM_rndF(0x10000);
                        bee->mTimer = 0;
                        bee->mSound.startSound(Z2SE_EN_BE_DEATH, 0, -1);
                        cXyz hit_mark_scale(0.35f, 0.35f, 0.35f);
                        dComIfGp_setHitMark(1, i_this, &bee->mPos, NULL, &hit_mark_scale, 0);
                    }
                }
            } else if (bee->mAction == bee_s::ACT_FAIL) {
                bee_fail(bee);
            } else if (bee->mAction == bee_s::ACT_START) {
                bees_flying++;
                bee_start(i_this, bee);
            }
            bee->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
        }
    }

    if (active_bees == 0) {
        fopAcM_delete(i_this);
    } else {
        if (bees_flying != 0) {
            if (dComIfGp_event_runCheck()) {
                i_this->mSound.playBeeGroupSound(Z2SE_EN_BE_FLY_D, bees_flying);
            } else {
                i_this->mSound.playBeeGroupSound(Z2SE_EN_BE_FLY, bees_flying);
            }
        }
        i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
        if (nest != NULL) {
            if (bees_in_nest != 0) {
                nest->mBeeSound.playBeeGroupSound(Z2SE_EN_BE_STAY, bees_in_nest);
            }
            nest->mBeeSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
        }
    }

    if (!dComIfGp_event_runCheck()) {
        dComIfG_Ccsp()->Set(&i_this->mCcSph);
        if (i_this->mCcSph.ChkAtHit()) {
            fopAc_ac_c* hit_actor = dCc_GetAc(i_this->mCcSph.GetAtHitObj()->GetAc());
            if (hit_actor != NULL && fopAcM_GetName(hit_actor) == PROC_ALINK) {
                dComIfGp_getVibration().StartShock(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f));
            }
        }
    }
}

/* 80684A94-80684B5C 002314 00C8+00 2/1 0/0 0/0 .text            daE_Bee_Execute__FP11e_bee_class */
static int daE_Bee_Execute(e_bee_class* i_this) {
    if (l_HIO.mDelete) {
        fopAcM_delete(i_this);
    }

    i_this->mCounter++;

    for (int i = 0; i < 2; i++) {
        if (i_this->mTimers[i] != 0) {
            i_this->mTimers[i]--;
        }
    }

    if (dComIfGp_event_runCheck()) {
        i_this->mCcSetTimer = 60;
    }
    if (i_this->mCcSetTimer != 0) {
        i_this->mCcSetTimer--;
    }

    bee_control(i_this);

    if (i_this->mCcSetTimer == 0) {
        i_this->mCcSetTimer = 4;
    }
    
    return 1;
}


/* 80684B5C-80684B64 0023DC 0008+00 1/0 0/0 0/0 .text            daE_Bee_IsDelete__FP11e_bee_class
 */
static int daE_Bee_IsDelete(e_bee_class* param_0) {
    return 1;
}

/* 80684B64-80684C70 0023E4 010C+00 1/0 0/0 0/0 .text            daE_Bee_Delete__FP11e_bee_class */
static int daE_Bee_Delete(e_bee_class* i_this) {
    static const u32 l_bmdidx[4] = {3, 4, 5, 6};
    if (i_this->mResLoaded) {
        for (u32 i = 0; i < 4; i++) {
            J3DModelData* model_data =
                static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", l_bmdidx[i]));
            dComIfGp_removeSimpleModel(model_data, fopAcM_GetRoomNo(i_this));
        }
    }
    
    dComIfG_resDelete(&i_this->mPhase, "E_bee");
    
    if (i_this->mHIOInit) {
        hioInit = false;
    }

    if (i_this->heap != NULL) {
        i_this->mSound.deleteObject();
        for (int i = 0; i < i_this->mNumBees; i++) {
            i_this->mBees[i].mSound.deleteObject();
        }
    }

    return 1;
}

/* 80684C70-80684E24 0024F0 01B4+00 1/1 0/0 0/0 .text            useHeapInit__FP10fopAc_ac_c */
static int useHeapInit(fopAc_ac_c* i_this) {
    e_bee_class* _this = static_cast<e_bee_class*>(i_this);
    
    J3DModelData* bmdBe01 = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", 3));
    J3DModelData* bmdBe02 = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", 4));
    J3DModelData* bmdBe03 = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", 5));
    J3DModelData* bmdBe04 = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", 6));

    _this->mSound.init(&_this->current.pos, 2);

    for (int i = 0; i < _this->mNumBees; i++) {
        _this->mBees[i].mpModel1 = mDoExt_J3DModel__create(bmdBe01, 0x20000, 0x11000084);
        if (_this->mBees[i].mpModel1 == NULL) {
            return false;
        }
        _this->mBees[i].mpModel2 = mDoExt_J3DModel__create(bmdBe02, 0x20000, 0x11000084);
        if (_this->mBees[i].mpModel2 == NULL) {
            return false;
        }
        _this->mBees[i].mpModel3 = mDoExt_J3DModel__create(bmdBe03, 0x20000, 0x11000084);
        if (_this->mBees[i].mpModel3 == NULL) {
            return false;
        }
        _this->mBees[i].mpModel4 = mDoExt_J3DModel__create(bmdBe04, 0x20000, 0x11000084);
        if (_this->mBees[i].mpModel4 == NULL) {
            return false;
        }
        _this->mBees[i].mSound.init(&_this->mBees[i].mPos, 1);
    }

    return true;
}

/* 80684E24-80685224 0026A4 0400+00 1/0 0/0 0/0 .text            daE_Bee_Create__FP10fopAc_ac_c */
static cPhs__Step daE_Bee_Create(fopAc_ac_c* i_this) {
    e_bee_class* _this = static_cast<e_bee_class*>(i_this);
    fopAcM_SetupActor(_this, e_bee_class);
    
    cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_bee");
    if (step == cPhs_COMPLEATE_e) {
        _this->mParam0 = (u8)fopAcM_GetParam(_this);
        _this->mParam1 = (u8)(fopAcM_GetParam(_this) >> 8);
        _this->mParam2 = (u8)(fopAcM_GetParam(_this) >> 16);
        if (_this->mParam2 == 0xff) {
            _this->mParam2 = 0;
        }
        _this->mNumBees = _this->mParam0 + 1;
        if (_this->mNumBees > 0x40) {
            _this->mNumBees = 0x40;
        }

        if (!fopAcM_entrySolidHeap(_this, useHeapInit, _this->mNumBees * 0x7e0)) {
            return cPhs_ERROR_e;
        }

        if (!hioInit) {
            _this->mHIOInit = true;
            hioInit = true;
            l_HIO.field_0x4 = -1;
        }

        if (_this->mParam1 == 1) {
            _this->scale.x = _this->mParam2 * 0.1f;
            _this->home.pos.y += _this->scale.x * -80.0f;
        }

        for (int i = 0; i < _this->mNumBees; i++) {
            if (_this->mParam1 == 1) {
                _this->mBees[i].mAction = bee_s::ACT_HOME;
            } else {
                _this->mBees[i].mAction = bee_s::ACT_FLY;
            }
            _this->mBees[i].mPos = _this->home.pos;
            _this->mBees[i].mCounter = cM_rndF(0x10000);
            _this->mBees[i].mScale = cM_rndFX(0.1f) + 1.0f;
        }

        _this->mCounter = fopAcM_GetID(i_this);

        _this->mCcStts.Init(0, 0, i_this);
        static dCcD_SrcCyl cc_cyl_src = {
            {
                {0x0, {{0x0, 0x0, 0x0}, {0x410022, 0x23}, 0x0}}, // mObj
                {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
                {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
                {0x0}, // mGObjCo
            }, // mObjInf
            {
                {0.0f, 0.0f, 0.0f}, // mCenter
                30.0f, // mRadius
                130.0f // mHeight
            } // mCcCyl
        };
        _this->mCcCyl.Set(cc_cyl_src);
        _this->mCcCyl.SetStts(&_this->mCcStts);
        _this->mCcCyl.OnTgNoHitMark();
        static dCcD_SrcSph at_sph_src = {
            {
                {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0xd}, {0x0, 0x0}, 0x0}}, // mObj
                {dCcD_SE_NONE, 0x0, 0xc, 0x0, 0x1}, // mGObjAt
                {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
                {0x0}, // mGObjCo
            }, // mObjInf
            {
                {{0.0f, 0.0f, 0.0f}, 30.0f} // mCcSph
            } // mCcSphAttr
        };
        _this->mCcSph.Set(at_sph_src);
        _this->mCcSph.SetStts(&_this->mCcStts);

        daE_Bee_Execute(_this);

        static const u32 l_bmdidx[4] = {3, 4, 5, 6};
        for (u32 i = 0; i < 4; i++) {
            J3DModelData* model_data =
                static_cast<J3DModelData*>(dComIfG_getObjectRes("E_bee", l_bmdidx[i]));
            dComIfGp_addSimpleModel(model_data, fopAcM_GetRoomNo(_this), false);
            _this->mResLoaded = true;
        }
    }
    return step;
}

/* 806856B4-806856B8 000084 0004+00 0/0 0/0 0/0 .bss
 * sInstance__40JASGlobalInstance<19JASDefaultBankTable>        */
#pragma push
#pragma force_active on
static u8 data_806856B4[4];
#pragma pop

/* 806856B8-806856BC 000088 0004+00 0/0 0/0 0/0 .bss
 * sInstance__35JASGlobalInstance<14JASAudioThread>             */
#pragma push
#pragma force_active on
static u8 data_806856B8[4];
#pragma pop

/* 806856BC-806856C0 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */
#pragma push
#pragma force_active on
static u8 data_806856BC[4];
#pragma pop

/* 806856C0-806856C4 000090 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */
#pragma push
#pragma force_active on
static u8 data_806856C0[4];
#pragma pop

/* 806856C4-806856C8 000094 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr>
 */
#pragma push
#pragma force_active on
static u8 data_806856C4[4];
#pragma pop

/* 806856C8-806856CC 000098 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr>
 */
#pragma push
#pragma force_active on
static u8 data_806856C8[4];
#pragma pop

/* 806856CC-806856D0 00009C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys>
 */
#pragma push
#pragma force_active on
static u8 data_806856CC[4];
#pragma pop

/* 806856D0-806856D4 0000A0 0004+00 0/0 0/0 0/0 .bss
 * sInstance__36JASGlobalInstance<15JAISoundStarter>            */
#pragma push
#pragma force_active on
static u8 data_806856D0[4];
#pragma pop

/* 806856D4-806856D8 0000A4 0004+00 0/0 0/0 0/0 .bss
 * sInstance__35JASGlobalInstance<14Z2SoundStarter>             */
#pragma push
#pragma force_active on
static u8 data_806856D4[4];
#pragma pop

/* 806856D8-806856DC 0000A8 0004+00 0/0 0/0 0/0 .bss
 * sInstance__33JASGlobalInstance<12Z2SpeechMgr2>               */
#pragma push
#pragma force_active on
static u8 data_806856D8[4];
#pragma pop

/* 806856DC-806856E0 0000AC 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */
#pragma push
#pragma force_active on
static u8 data_806856DC[4];
#pragma pop

/* 806856E0-806856E4 0000B0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */
#pragma push
#pragma force_active on
static u8 data_806856E0[4];
#pragma pop

/* 806856E4-806856E8 0000B4 0004+00 0/0 0/0 0/0 .bss
 * sInstance__33JASGlobalInstance<12JAIStreamMgr>               */
#pragma push
#pragma force_active on
static u8 data_806856E4[4];
#pragma pop

/* 806856E8-806856EC 0000B8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr>
 */
#pragma push
#pragma force_active on
static u8 data_806856E8[4];
#pragma pop

/* 806856EC-806856F0 0000BC 0004+00 0/0 0/0 0/0 .bss
 * sInstance__33JASGlobalInstance<12JAISoundInfo>               */
#pragma push
#pragma force_active on
static u8 data_806856EC[4];
#pragma pop

/* 806856F0-806856F4 0000C0 0004+00 0/0 0/0 0/0 .bss
 * sInstance__34JASGlobalInstance<13JAUSoundTable>              */
#pragma push
#pragma force_active on
static u8 data_806856F0[4];
#pragma pop

/* 806856F4-806856F8 0000C4 0004+00 0/0 0/0 0/0 .bss
 * sInstance__38JASGlobalInstance<17JAUSoundNameTable>          */
#pragma push
#pragma force_active on
static u8 data_806856F4[4];
#pragma pop

/* 806856F8-806856FC 0000C8 0004+00 0/0 0/0 0/0 .bss
 * sInstance__33JASGlobalInstance<12JAUSoundInfo>               */
#pragma push
#pragma force_active on
static u8 data_806856F8[4];
#pragma pop

/* 806856FC-80685700 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo>
 */
#pragma push
#pragma force_active on
static u8 data_806856FC[4];
#pragma pop

/* 80685700-80685704 0000D0 0004+00 0/0 0/0 0/0 .bss
 * sInstance__34JASGlobalInstance<13Z2SoundObjMgr>              */
#pragma push
#pragma force_active on
static u8 data_80685700[4];
#pragma pop

/* 80685704-80685708 0000D4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience>
 */
#pragma push
#pragma force_active on
static u8 data_80685704[4];
#pragma pop

/* 80685708-8068570C 0000D8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr>
 */
#pragma push
#pragma force_active on
static u8 data_80685708[4];
#pragma pop

/* 8068570C-80685710 0000DC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr>
 */
#pragma push
#pragma force_active on
static u8 data_8068570C[4];
#pragma pop

/* 80685710-80685714 0000E0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr>
 */
#pragma push
#pragma force_active on
static u8 data_80685710[4];
#pragma pop

/* 80685714-80685718 0000E4 0004+00 0/0 0/0 0/0 .bss
 * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr>              */
#pragma push
#pragma force_active on
static u8 data_80685714[4];
#pragma pop

/* 80685524-80685524 0000F0 0000+00 0/0 0/0 0/0 .rodata          @stringBase0 */

/* 806855B0-806855D0 -00001 0020+00 1/0 0/0 0/0 .data            l_daE_Bee_Method */
static actor_method_class l_daE_Bee_Method = {
    (process_method_func)daE_Bee_Create,
    (process_method_func)daE_Bee_Delete,
    (process_method_func)daE_Bee_Execute,
    (process_method_func)daE_Bee_IsDelete,
    (process_method_func)daE_Bee_Draw,
};

/* 806855D0-80685600 -00001 0030+00 0/0 0/0 1/0 .data            g_profile_E_BEE */
extern actor_process_profile_definition g_profile_E_BEE = {
    fpcLy_CURRENT_e,
    7,
    fpcPi_CURRENT_e,
    PROC_E_BEE,
    &g_fpcLf_Method.base,
    sizeof(e_bee_class),
    0,
    0,
    &g_fopAc_Method.base,
    0xB7,
    &l_daE_Bee_Method,
    0x44000,
    fopAc_ACTOR_e,
    fopAc_CULLBOX_CUSTOM_e,
};