summaryrefslogtreecommitdiff
path: root/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c
blob: afbe4a718679ba0baef3b62f8ce31c3c79860e33 (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
/*
 * File: z_en_bomjimb.c
 * Overlay: ovl_En_Bomjimb
 * Description: Bombers when chasing them
 */

#include "z_en_bomjimb.h"
#include "overlays/actors/ovl_En_Niw/z_en_niw.h"

#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)

void EnBomjimb_Init(Actor* thisx, PlayState* play);
void EnBomjimb_Destroy(Actor* thisx, PlayState* play);
void EnBomjimb_Update(Actor* thisx, PlayState* play2);
void EnBomjimb_Draw(Actor* thisx, PlayState* play);

void func_80C01494(EnBomjimb* this);
void func_80C014E4(EnBomjimb* this, PlayState* play);
void func_80C01984(EnBomjimb* this, PlayState* play);
void func_80C01A24(EnBomjimb* this, PlayState* play);
void func_80C01B40(EnBomjimb* this);
void func_80C01B74(EnBomjimb* this, PlayState* play);
void func_80C01C18(EnBomjimb* this, PlayState* play);
void func_80C01CD0(EnBomjimb* this, PlayState* play);
void func_80C0201C(EnBomjimb* this, PlayState* play);
void func_80C02108(EnBomjimb* this);
void func_80C0217C(EnBomjimb* this, PlayState* play);
void func_80C0250C(EnBomjimb* this);
void func_80C02570(EnBomjimb* this, PlayState* play);
void func_80C0267C(EnBomjimb* this);
void func_80C02704(EnBomjimb* this, PlayState* play);
void func_80C02740(EnBomjimb* this, PlayState* play);
void func_80C02A14(EnBomjimb* this, PlayState* play);
void func_80C02BCC(EnBomjimb* this, PlayState* play);
void func_80C02CA4(EnBomjimb* this, PlayState* play);
void func_80C02DAC(EnBomjimb* this, PlayState* play);

static Actor* D_80C03170 = NULL;

ActorProfile En_Bomjimb_Profile = {
    /**/ ACTOR_EN_BOMJIMB,
    /**/ ACTORCAT_NPC,
    /**/ FLAGS,
    /**/ OBJECT_CS,
    /**/ sizeof(EnBomjimb),
    /**/ EnBomjimb_Init,
    /**/ EnBomjimb_Destroy,
    /**/ EnBomjimb_Update,
    /**/ EnBomjimb_Draw,
};

static ColliderCylinderInit sCylinderInit = {
    {
        COL_MATERIAL_NONE,
        AT_NONE,
        AC_ON | AC_TYPE_PLAYER,
        OC1_ON | OC1_TYPE_ALL,
        OC2_TYPE_2,
        COLSHAPE_CYLINDER,
    },
    {
        ELEM_MATERIAL_UNK0,
        { 0x00000000, 0x00, 0x00 },
        { 0xF7CFFFFF, 0x00, 0x00 },
        ATELEM_NONE | ATELEM_SFX_NORMAL,
        ACELEM_ON,
        OCELEM_ON,
    },
    { 20, 30, 0, { 0, 0, 0 } },
};

typedef enum {
    /*   -1 */ ENBOMJIMB_ANIM_NONE = -1,
    /* 0x00 */ ENBOMJIMB_ANIM_IDLE,
    /* 0x01 */ ENBOMJIMB_ANIM_HANDS_ON_HIPS,
    /* 0x02 */ ENBOMJIMB_ANIM_TALK_NORMAL,
    /* 0x03 */ ENBOMJIMB_ANIM_TALK_HANDS_ON_HIPS,
    /* 0x04 */ ENBOMJIMB_ANIM_BLOWGUN,
    /* 0x05 */ ENBOMJIMB_ANIM_WALK,
    /* 0x06 */ ENBOMJIMB_ANIM_SURPRISE,
    /* 0x07 */ ENBOMJIMB_ANIM_HIDE_UNDER_BOX,
    /* 0x08 */ ENBOMJIMB_ANIM_DAZED,
    /* 0x09 */ ENBOMJIMB_ANIM_SIT,
    /* 0x0A */ ENBOMJIMB_ANIM_CLIMB,
    /* 0x0B */ ENBOMJIMB_ANIM_HOLD_CUCCO,
    /* 0x0C */ ENBOMJIMB_ANIM_TURN_AROUND,
    /* 0x0D */ ENBOMJIMB_ANIM_SHOW_NUMBER,
    /* 0x0E */ ENBOMJIMB_ANIM_TALK_SHOWING_NUMBER,
    /* 0x0F */ ENBOMJIMB_ANIM_TAUNT,
    /* 0x10 */ ENBOMJIMB_ANIM_JUMP,
    /* 0x11 */ ENBOMJIMB_ANIM_ARM_SWIPE,
    /* 0x12 */ ENBOMJIMB_ANIM_SALUTE,
    /* 0x13 */ ENBOMJIMB_ANIM_RUN,
    /* 0x14 */ ENBOMJIMB_ANIM_LOOK_AROUND,
    /* 0x15 */ ENBOMJIMB_ANIM_CAUGHT,
    /* 0x16 */ ENBOMJIMB_ANIM_MAX
} EnBomjimbAnimation;

static AnimationHeader* sAnimations[ENBOMJIMB_ANIM_MAX] = {
    &gBomberIdleAnim,              // ENBOMJIMB_ANIM_IDLE
    &gBomberHandsOnHipsAnim,       // ENBOMJIMB_ANIM_HANDS_ON_HIPS
    &gBomberTalkNormalAnim,        // ENBOMJIMB_ANIM_TALK_NORMAL
    &gBomberTalkHandsOnHipsAnim,   // ENBOMJIMB_ANIM_TALK_HANDS_ON_HIPS
    &gBomberBlowgunAnim,           // ENBOMJIMB_ANIM_BLOWGUN
    &gBomberWalkAnim,              // ENBOMJIMB_ANIM_WALK
    &gBomberSurpriseAnim,          // ENBOMJIMB_ANIM_SURPRISE
    &gBomberHideUnderBoxAnim,      // ENBOMJIMB_ANIM_HIDE_UNDER_BOX
    &gBomberDazedAnim,             // ENBOMJIMB_ANIM_DAZED
    &gBomberSitAnim,               // ENBOMJIMB_ANIM_SIT
    &gBomberClimbAnim,             // ENBOMJIMB_ANIM_CLIMB
    &gBomberHoldCuccoAnim,         // ENBOMJIMB_ANIM_HOLD_CUCCO
    &gBomberTurnAroundAnim,        // ENBOMJIMB_ANIM_TURN_AROUND
    &gBomberShowNumberAnim,        // ENBOMJIMB_ANIM_SHOW_NUMBER
    &gBomberTalkShowingNumberAnim, // ENBOMJIMB_ANIM_TALK_SHOWING_NUMBER
    &gBomberTauntAnim,             // ENBOMJIMB_ANIM_TAUNT
    &gBomberJumpAnim,              // ENBOMJIMB_ANIM_JUMP
    &gBomberArmSwipeAnim,          // ENBOMJIMB_ANIM_ARM_SWIPE
    &gBomberSaluteAnim,            // ENBOMJIMB_ANIM_SALUTE
    &gBomberRunAnim,               // ENBOMJIMB_ANIM_RUN
    &gBomberLookAroundAnim,        // ENBOMJIMB_ANIM_LOOK_AROUND
    &gBomberCaughtAnim,            // ENBOMJIMB_ANIM_CAUGHT
};

static u8 sAnimationModes[ENBOMJIMB_ANIM_MAX] = {
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_IDLE
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_HANDS_ON_HIPS
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_TALK_NORMAL
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_TALK_HANDS_ON_HIPS
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_BLOWGUN
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_WALK
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_SURPRISE
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_HIDE_UNDER_BOX
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_DAZED
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_SIT
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_CLIMB
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_HOLD_CUCCO
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_TURN_AROUND
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_SHOW_NUMBER
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_TALK_SHOWING_NUMBER
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_TAUNT
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_JUMP
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_ARM_SWIPE
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_SALUTE
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_RUN
    ANIMMODE_LOOP, // ENBOMJIMB_ANIM_LOOK_AROUND
    ANIMMODE_ONCE, // ENBOMJIMB_ANIM_CAUGHT
};

void EnBomjimb_Init(Actor* thisx, PlayState* play) {
    EnBomjimb* this = (EnBomjimb*)thisx;

    this->actor.colChkInfo.mass = MASS_IMMOVABLE;
    ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f);
    this->actor.gravity = -2.0f;
    SkelAnime_InitFlex(play, &this->skelAnime, &gBomberSkel, &gBomberIdleAnim, this->jointTable, this->morphTable,
                       OBJECT_CS_LIMB_MAX);
    Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
    this->actor.attentionRangeType = ATTENTION_RANGE_6;
    Actor_SetScale(&this->actor, 0.01f);

    this->unk_2C6 = ENBOMJIMB_GET_F0(&this->actor);
    this->unk_2B2 = ENBOMJIMB_GET_FF00(&this->actor);

    if (this->unk_2C6 != ENBOMJIMB_F0_0) {
        this->unk_2C8 = ENBOMJIMB_GET_F(&this->actor) + 1;
    }

    if (this->unk_2C8 < ENBOMJIMB_F_0) {
        this->unk_2C8 = ENBOMJIMB_F_0;
    }

    if (this->unk_2C6 < ENBOMJIMB_F0_0) {
        this->unk_2C6 = ENBOMJIMB_F0_0;
    }

    if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_10) || CHECK_WEEKEVENTREG(WEEKEVENTREG_85_02)) {
        switch (this->unk_2C8) {
            case ENBOMJIMB_F_0:
                if (CHECK_WEEKEVENTREG(WEEKEVENTREG_11_01)) {
                    Actor_Kill(&this->actor);
                    return;
                }
                break;

            case ENBOMJIMB_F_1:
                if (CHECK_WEEKEVENTREG(WEEKEVENTREG_11_02)) {
                    Actor_Kill(&this->actor);
                    return;
                }
                break;

            case ENBOMJIMB_F_2:
                if (CHECK_WEEKEVENTREG(WEEKEVENTREG_11_04)) {
                    Actor_Kill(&this->actor);
                    return;
                }
                break;

            case ENBOMJIMB_F_3:
                if (CHECK_WEEKEVENTREG(WEEKEVENTREG_11_08)) {
                    Actor_Kill(&this->actor);
                    return;
                }
                break;

            case ENBOMJIMB_F_4:
                if (CHECK_WEEKEVENTREG(WEEKEVENTREG_11_10)) {
                    Actor_Kill(&this->actor);
                    return;
                }
                break;

            default:
                break;
        }
    }

    if ((!CHECK_WEEKEVENTREG(WEEKEVENTREG_73_10) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_85_02)) ||
        CHECK_WEEKEVENTREG(WEEKEVENTREG_75_40)) {
        Actor_Kill(&this->actor);
        return;
    }

    Math_Vec3f_Copy(&this->unk_2A0, &this->actor.home.pos);
    if ((this->unk_2C6 == ENBOMJIMB_F0_0) || (this->unk_2C6 == ENBOMJIMB_F0_1) || (this->unk_2C6 != ENBOMJIMB_F0_2)) {
        func_80C01494(this);
    } else {
        func_80C01984(this, play);
    }
}

void EnBomjimb_Destroy(Actor* thisx, PlayState* play) {
    EnBomjimb* this = (EnBomjimb*)thisx;

    Collider_DestroyCylinder(play, &this->collider);
}

void EnBomjimb_ChangeAnim(EnBomjimb* this, s32 animIndex, f32 playSpeed) {
    this->animIndex = animIndex;
    this->animEndFrame = Animation_GetLastFrame(sAnimations[animIndex]);
    Animation_Change(&this->skelAnime, sAnimations[this->animIndex], playSpeed, 0.0f, this->animEndFrame,
                     sAnimationModes[this->animIndex], -4.0f);
}

void func_80C011CC(EnBomjimb* this) {
    if ((this->animIndex == ENBOMJIMB_ANIM_WALK) &&
        (Animation_OnFrame(&this->skelAnime, 9.0f) || Animation_OnFrame(&this->skelAnime, 10.0f) ||
         Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 18.0f))) {
        Actor_PlaySfx(&this->actor, NA_SE_EV_BOMBERS_WALK);
    }

    if ((this->animIndex == ENBOMJIMB_ANIM_RUN) &&
        (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f))) {
        Actor_PlaySfx(&this->actor, NA_SE_EV_BOMBERS_WALK);
    }

    if ((this->animIndex == ENBOMJIMB_ANIM_SALUTE) && Animation_OnFrame(&this->skelAnime, 15.0f)) {
        Actor_PlaySfx(&this->actor, NA_SE_EV_BOMBERS_LAND);
    }

    if ((this->animIndex == ENBOMJIMB_ANIM_HIDE_UNDER_BOX) && Animation_OnFrame(&this->skelAnime, 8.0f)) {
        Actor_PlaySfx(&this->actor, NA_SE_EV_BOMBERS_LAND);
    }
}

void func_80C012E0(EnBomjimb* this) {
    this->unk_2C0 = 0;
    this->unk_2AE = 0;
    this->unk_2B0 = 0;
    this->unk_2CC = 0;
    this->unk_290 = 0;
}

s32 func_80C012FC(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);

    if (!Play_InCsMode(play) && (this->actor.xzDistToPlayer < 40.0f) &&
        (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 50.0f) && (play->msgCtx.msgLength == 0)) {
        this->actor.speed = 0.0f;
        func_80C02740(this, play);
        return true;
    }
    return false;
}

s32 func_80C013B4(EnBomjimb* this) {
    if (this->collider.base.acFlags & AC_HIT) {
        func_80C0267C(this);
        return true;
    }
    return false;
}

s32 func_80C013F0(EnBomjimb* this, PlayState* play) {
    Actor* sp1C;

    if (this->collider.base.ocFlags1 & OC1_HIT) {
        sp1C = this->collider.base.oc;

        if ((sp1C->id == ACTOR_OBJ_KIBAKO) && (D_80C03170 == NULL) && (sp1C->update != NULL) &&
            !Actor_HasParent(sp1C, play)) {
            D_80C03170 = sp1C;
            this->unk_2E4 = sp1C;
            func_80C01C18(this, play);
            return true;
        }
    }
    return false;
}

void func_80C01494(EnBomjimb* this) {
    func_80C012E0(this);
    Math_Vec3f_Copy(&this->unk_2A0, &this->actor.world.pos);
    this->unk_2CA = 3;
    this->actionFunc = func_80C014E4;
}

void func_80C014E4(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);
    f32 curFrame = this->skelAnime.curFrame;
    CollisionPoly* colPoly;
    s16 abs;
    f32 x;
    f32 z;
    f32 phi_f0;
    Vec3f sp60;
    Vec3f sp54;
    Vec3f sp48;
    s32 bgId;

    if (func_80C012FC(this, play) || func_80C013B4(this) || func_80C013F0(this, play)) {
        return;
    }

    switch (this->unk_2CC) {
        case 0:
            if (this->unk_2AE == 0) {
                Math_Vec3f_Copy(&sp48, &this->actor.home.pos);
                sp48.x += Rand_CenteredFloat(150.0f);
                sp48.z += Rand_CenteredFloat(150.0f);

                abs = ABS_ALT(BINANG_SUB(this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp48)));
                if ((abs < 0x4000) && !BgCheck_EntityLineTest1(&play->colCtx, &this->actor.world.pos, &sp48, &sp60,
                                                               &colPoly, true, false, false, true, &bgId)) {
                    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_WALK, 1.0f);
                    Math_Vec3f_Copy(&this->unk_294, &sp48);
                    this->unk_2B0 = Rand_S16Offset(30, 50);
                    this->unk_2CC++;
                }
            }
            break;

        case 1:
            if (curFrame >= 0.0f) {
                this->unk_2D6 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_294);
                Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2D6, 10, 0x7D0, 0x14);
            }

            if ((s16)ABS_ALT(BINANG_SUB(this->actor.world.rot.y, this->unk_2D6)) < 0x100) {
                Math_Vec3f_Copy(&sp54, &this->actor.world.pos);
                sp54.x += Math_SinS(this->actor.world.rot.y) * 60.0f;
                sp54.z += Math_CosS(this->actor.world.rot.y) * 60.0f;
                if (BgCheck_EntityLineTest1(&play->colCtx, &this->actor.world.pos, &sp54, &sp60, &colPoly, true, false,
                                            false, true, &bgId)) {
                    this->unk_2AE = 0;
                    if (Rand_ZeroOne() < 0.5f) {
                        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_LOOK_AROUND, 1.0f);
                    } else {
                        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_IDLE, 1.0f);
                    }
                    this->unk_2CC = 0;
                    this->unk_2B4 = 0.0f;
                    break;
                }
            }

            x = this->unk_294.x - this->actor.world.pos.x;
            z = this->unk_294.z - this->actor.world.pos.z;

            if ((this->unk_2B0 == 0) || (sqrtf(SQ(x) + SQ(z)) < 4.0f)) {
                this->unk_2AE = Rand_S16Offset(20, 20);
                if (!(this->unk_2AE & 1)) {
                    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_LOOK_AROUND, 1.0f);
                } else {
                    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_IDLE, 1.0f);
                }
                this->unk_2CC = 0;
                this->unk_2B4 = 0.0f;
            } else if (curFrame >= 0.0f) {
                Math_ApproachF(&this->actor.world.pos.x, this->unk_294.x, 0.3f, this->unk_2B4);
                Math_ApproachF(&this->actor.world.pos.z, this->unk_294.z, 0.3f, this->unk_2B4);
                Math_ApproachF(&this->unk_2B4, 1.0f, 0.3f, 0.5f);
            }
            break;

        default:
            break;
    }

    if (player->stateFlags3 != PLAYER_STATE3_1000000) {
        phi_f0 = 200.0f;

        abs = ABS_ALT(BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.world.rot.y));
        if (abs > 0x2890) {
            phi_f0 = 150.0f;
        }

        if (this->actor.xzDistToPlayer < phi_f0) {
            func_80C02108(this);
        }
    }
}

void func_80C01984(EnBomjimb* this, PlayState* play) {
    func_80C012E0(this);
    this->unk_2E4 =
        Actor_Spawn(&play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x, this->actor.world.pos.y + 30.0f,
                    this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, 2);
    if (this->unk_2E4 != NULL) {
        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_HOLD_CUCCO, 1.0f);
    }
    this->unk_2CA = 0;
    this->actionFunc = func_80C01A24;
}

void func_80C01A24(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);

    this->actor.gravity = -0.1f;
    if (this->collider.base.acFlags & AC_HIT) {
        this->collider.base.acFlags &= ~AC_HIT;
        if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) {
            ((EnNiw*)this->unk_2E4)->unk2BC.z = 90000.0f;
        }
        this->actor.speed = 0.0f;
        this->unk_2E4 = NULL;
        this->actor.gravity = -2.0f;
        func_80C02108(this);
        return;
    }

    if ((this->actor.xzDistToPlayer < 200.0f) && (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 40.0f)) {
        this->unk_2C0 = 1;
    }

    if (this->unk_2C0 != 0) {
        Math_ApproachF(&this->actor.speed, 6.0f, 0.5f, 2.0f);
    }

    if ((this->unk_2C0 != 0) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
        func_80C01B40(this);
    }
}

void func_80C01B40(EnBomjimb* this) {
    func_80C012E0(this);
    this->unk_2CA = 0;
    this->actionFunc = func_80C01B74;
}

void func_80C01B74(EnBomjimb* this, PlayState* play) {
    Math_ApproachF(&this->actor.speed, 6.0f, 0.5f, 2.0f);
    if ((this->collider.base.acFlags & AC_HIT) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
        this->collider.base.acFlags &= ~AC_HIT;
        if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) {
            ((EnNiw*)this->unk_2E4)->unk2BC.z = 90000.0f;
        }
        this->actor.speed = 0.0f;
        this->unk_2E4 = NULL;
        this->actor.gravity = -2.0f;
        func_80C02108(this);
    }
}

void func_80C01C18(EnBomjimb* this, PlayState* play) {
    func_80C012E0(this);
    if (this->unk_2E4 != NULL) {
        if (this->unk_2E4->update != NULL) {
            this->unk_2E4->velocity.y = 8.0f;
            this->unk_2E4->shape.rot.z = BINANG_SUB(4000, ((s16)(play->gameplayFrames & 2) * 4000));
            this->unk_294.x = this->unk_2E4->world.pos.x;
            this->unk_294.y = this->actor.world.pos.y;
            this->unk_294.z = this->unk_2E4->world.pos.z;
        }
    }
    this->actor.speed = 0.0f;
    this->unk_2CA = 2;
    this->actionFunc = func_80C01CD0;
}

void func_80C01CD0(EnBomjimb* this, PlayState* play) {
    f32 curFrame = this->skelAnime.curFrame;
    s32 pad[2];

    if ((this->unk_2E4 != NULL) && ((this->unk_2E4->update == NULL) || Actor_HasParent(this->unk_2E4, play))) {
        this->actor.draw = EnBomjimb_Draw;
        D_80C03170 = NULL;
        this->unk_2E4 = NULL;
        func_80C02108(this);
        return;
    }

    if (this->animIndex != ENBOMJIMB_ANIM_HIDE_UNDER_BOX) {
        Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_294), 1, 0xBB8,
                           0);
        Math_ApproachF(&this->actor.world.pos.x, this->unk_294.x, 0.3f, 2.0f);
        Math_ApproachF(&this->actor.world.pos.z, this->unk_294.z, 0.3f, 2.0f);
        if (sqrtf(SQ(this->actor.world.pos.x - this->unk_294.x) + SQ(this->actor.world.pos.z - this->unk_294.z)) <
            3.0f) {
            EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_HIDE_UNDER_BOX, 1.0f);
            Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_294);
        }
    } else if (curFrame >= this->animEndFrame) {
        this->actor.draw = NULL;
    }

    if ((this->unk_2C0 == 0) && (this->unk_2E4->bgCheckFlags & BGCHECKFLAG_GROUND)) {
        Actor_PlaySfx(&this->actor, NA_SE_EV_PUT_DOWN_WOODBOX);
        this->unk_2C0 = 1;
    }

    if (this->unk_2AE == 0) {
        if (this->actor.draw == NULL) {
            this->unk_2AE = Rand_S16Offset(20, 30);
            this->unk_2E4->shape.rot.z = 1000;
            return;
        }

        this->unk_2AE = 10;
        if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) {
            if ((play->gameplayFrames % 16) == 0) {
                this->unk_2E4->shape.rot.z = -this->unk_2E4->shape.rot.z;
                this->unk_2E4->shape.rot.z *= 0.1f;
            }

            if (fabsf(this->unk_2E4->shape.rot.z) < 100.0f) {
                this->unk_2E4->shape.rot.z = 0;
            }
        }
        return;
    }

    if (this->actor.draw == NULL) {
        this->unk_2E4->shape.rot.z = -this->unk_2E4->shape.rot.z;
        this->unk_2E4->shape.rot.z *= 0.1f;
        if (fabsf(this->unk_2E4->shape.rot.z) < 100.0f) {
            this->unk_2E4->shape.rot.z = 0;
        }
    }
}

void func_80C01FD4(EnBomjimb* this) {
    this->actor.textId = 0x72D;
    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_SIT, 1.0f);
    this->unk_2CA = 4;
    this->actionFunc = func_80C0201C;
}

void func_80C0201C(EnBomjimb* this, PlayState* play) {
    s16 abs = ABS_ALT(BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.world.rot.y));

    this->unk_290 = 0;
    if ((this->actor.xzDistToPlayer < 200.0f) && (abs < 0x61A8)) {
        this->unk_290 = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
        if (this->unk_290 > 10000) {
            this->unk_290 = 10000;
        } else if (this->unk_290 < -10000) {
            this->unk_290 = -10000;
        }
    }

    if (Actor_TalkOfferAccepted(&this->actor, &play->state)) {
        this->unk_2CA = 10;
        this->actionFunc = func_80C02A14;
    } else {
        Actor_OfferTalk(&this->actor, play, 40.0f);
    }
}

void func_80C02108(EnBomjimb* this) {
    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_SURPRISE, 1.0f);
    this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
    this->actor.world.rot.y = this->actor.yawTowardsPlayer;
    func_80C012E0(this);
    Math_Vec3f_Copy(&this->unk_2A0, &this->actor.world.pos);
    this->unk_2D4 = 0;
    this->unk_2CA = 5;
    this->actionFunc = func_80C0217C;
}

void func_80C0217C(EnBomjimb* this, PlayState* play) {
    Vec3f sp74;
    CollisionPoly* sp70;
    Vec3f sp64;
    s32 bgId;
    s32 floorBgId = this->actor.floorBgId;
    CollisionPoly* sp58 = this->actor.floorPoly;
    Player* player = GET_PLAYER(play);
    s32 sp50 = false;

    if (func_80C012FC(this, play) || func_80C013B4(this) || func_80C013F0(this, play)) {
        return;
    }

    if (player->stateFlags3 == PLAYER_STATE3_1000000) {
        Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
        func_80C01494(this);
        return;
    }

    if (this->animIndex == ENBOMJIMB_ANIM_SURPRISE) {
        f32 curFrame = this->skelAnime.curFrame;

        if (curFrame >= this->animEndFrame) {
            EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_RUN, 2.0f);
        }
        return;
    }

    Math_ApproachF(&this->actor.speed, 8.0f, 0.5f, 2.0f);
    Math_Vec3f_Copy(&sp74, &this->actor.world.pos);

    sp74.x += Math_SinS(this->actor.world.rot.y) * 50.0f;
    sp74.y += 20.0f;
    sp74.z += Math_CosS(this->actor.world.rot.y) * 50.0f;

    if (BgCheck_EntityLineTest1(&play->colCtx, &this->actor.world.pos, &sp74, &sp64, &sp70, true, false, false, true,
                                &bgId)) {
        s16 temp = BINANG_SUB((this->actor.world.rot.y - this->actor.yawTowardsPlayer), 0x8000);
        this->unk_2D6 = temp;

        if (temp < 0) {
            this->unk_2D6 += BINANG_ADD((s32)Rand_ZeroFloat(0x200), 0x4000);
            if (this->unk_2D0 != 0) {
                this->unk_2D6 += BINANG_ADD((s32)Rand_ZeroFloat(0x200), 0x4000);
            }
            this->unk_2D0 = 1;
        } else {
            this->unk_2D6 -= BINANG_ADD((s32)Rand_ZeroFloat(0x200), 0x4000);
            if (this->unk_2D0 != 0) {
                this->unk_2D6 -= BINANG_ADD((s32)Rand_ZeroFloat(0x200), 0x4000);
            }
            this->unk_2D0 = 1;
        }
        sp50 = true;
    }

    if (!sp50) {
        this->unk_2D0 = 0;
        if (this->actor.xzDistToPlayer < 60.0f) {
            this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
        }
    }

    this->actor.world.rot.y = this->unk_2D6 + this->unk_2D4;

    if (SurfaceType_GetSceneExitIndex(&play->colCtx, sp58, floorBgId) != 0) {
        s16 temp = BINANG_SUB(this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x8000);

        if (temp < 0) {
            this->unk_2D4 -= 0x1000;
        } else {
            this->unk_2D4 += 0x1000;
        }
        this->actor.world.rot.y = this->unk_2D6 + this->unk_2D4;
        return;
    }

    this->unk_2D4 = 0;
    if (!sp50 && (this->actor.xzDistToPlayer > 200.0f)) {
        func_80C0250C(this);
    }
}

void func_80C0250C(EnBomjimb* this) {
    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_TAUNT, 1.0f);
    this->unk_2D4 = 0;
    this->actor.speed = 0.0f;
    this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
    func_80C012E0(this);
    this->unk_2CA = 6;
    this->actionFunc = func_80C02570;
}

void func_80C02570(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);

    if (func_80C012FC(this, play) || func_80C013B4(this) || func_80C013F0(this, play)) {
        return;
    }

    Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1388, 0);

    if (this->actor.xzDistToPlayer < 200.0f) {
        this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer);
        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_RUN, 2.0f);
        this->actionFunc = func_80C0217C;
    } else if ((player->stateFlags3 == PLAYER_STATE3_1000000) || (this->actor.xzDistToPlayer > 410.0f)) {
        Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0);
        func_80C01494(this);
    }
}

void func_80C0267C(EnBomjimb* this) {
    func_80C012E0(this);
    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_DAZED, 1.0f);
    this->actor.speed = 0.0f;
    this->actor.world.rot.y = this->actor.yawTowardsPlayer;
    this->unk_2AE = 40;
    this->unk_2C2 = 0;
    this->unk_2C4 = (s32)Rand_ZeroFloat(60.0f) + 20;
    this->unk_2CA = 7;
    this->actionFunc = func_80C02704;
}

void func_80C02704(EnBomjimb* this, PlayState* play) {
    if (!func_80C012FC(this, play) && (this->unk_2AE == 0)) {
        func_80C0250C(this);
    }
}

void func_80C02740(EnBomjimb* this, PlayState* play) {
    static u16 D_80C03230[] = {
        0x0721, 0x0722, 0x0723, 0x0724, 0x072C,
    };
    Player* player = GET_PLAYER(play);

    func_80C012E0(this);
    EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_CAUGHT, 1.0f);
    if ((player->transformation != PLAYER_FORM_DEKU) && (player->transformation != PLAYER_FORM_HUMAN)) {
        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_ARM_SWIPE, 1.0f);
        Message_StartTextbox(play, 0x72E, &this->actor);
        player->stateFlags1 |= PLAYER_STATE1_10000000;
        player->actor.freezeTimer = 3;
        func_80C012E0(this);
        this->unk_2CA = 9;
        this->actionFunc = func_80C02BCC;
        return;
    }

    if (((player->transformation == PLAYER_FORM_DEKU) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_73_10)) ||
        ((player->transformation == PLAYER_FORM_HUMAN) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_85_02))) {
        EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_ARM_SWIPE, 1.0f);
        Message_StartTextbox(play, 0x72E, &this->actor);
        player->stateFlags1 |= PLAYER_STATE1_10000000;
        player->actor.freezeTimer = 3;
        func_80C012E0(this);
        this->unk_2CA = 9;
        this->actionFunc = func_80C02BCC;
        return;
    }

    Message_StartTextbox(play, D_80C03230[((void)0, gSaveContext.save.saveInfo.bombersCaughtNum)], &this->actor);
    gSaveContext.save.saveInfo.bombersCaughtOrder[((void)0, gSaveContext.save.saveInfo.bombersCaughtNum)] =
        this->unk_2C8 + 1;
    gSaveContext.save.saveInfo.bombersCaughtNum++;

    if (gSaveContext.save.saveInfo.bombersCaughtNum > 4) {
        Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900);
    } else {
        Actor_PlaySfx(&this->actor, NA_SE_SY_PIECE_OF_HEART);
    }

    switch (this->unk_2C8) {
        case ENBOMJIMB_F_0:
            SET_WEEKEVENTREG(WEEKEVENTREG_76_01);
            SET_WEEKEVENTREG(WEEKEVENTREG_11_01);
            break;

        case ENBOMJIMB_F_1:
            SET_WEEKEVENTREG(WEEKEVENTREG_76_02);
            SET_WEEKEVENTREG(WEEKEVENTREG_11_02);
            break;

        case ENBOMJIMB_F_2:
            SET_WEEKEVENTREG(WEEKEVENTREG_76_04);
            SET_WEEKEVENTREG(WEEKEVENTREG_11_04);
            break;

        case ENBOMJIMB_F_3:
            SET_WEEKEVENTREG(WEEKEVENTREG_76_08);
            SET_WEEKEVENTREG(WEEKEVENTREG_11_08);
            break;

        case ENBOMJIMB_F_4:
            SET_WEEKEVENTREG(WEEKEVENTREG_76_10);
            SET_WEEKEVENTREG(WEEKEVENTREG_11_10);
            break;

        default:
            break;
    }

    if (!Play_InCsMode(play)) {
        Player* player = GET_PLAYER(play);

        player->stateFlags1 |= PLAYER_STATE1_10000000;
        player->actor.freezeTimer = 3;
    }
    this->unk_2CA = 8;
    this->actionFunc = func_80C02A14;
}

void func_80C02A14(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);
    f32 curFrame = this->skelAnime.curFrame;

    if (this->animIndex == ENBOMJIMB_ANIM_CAUGHT) {
        player->actor.freezeTimer = 3;
        if (curFrame >= this->animEndFrame) {
            EnBomjimb_ChangeAnim(this, ENBOMJIMB_ANIM_SIT, 1.0f);
        }
        return;
    }

    if ((this->unk_2CA == 8) && (this->animIndex == ENBOMJIMB_ANIM_SIT)) {
        player->actor.freezeTimer = 3;
        if (this->unk_2E0 == 0) {
            if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
                Actor_PlaySfx(&this->actor, NA_SE_EV_HUMAN_BOUND);
                this->unk_2E0 = 1;
            }
        }
    }

    if ((this->animIndex == ENBOMJIMB_ANIM_TAUNT) && (this->unk_2CA == 8)) {
        player->actor.freezeTimer = 3;
    }

    if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
        Message_CloseTextbox(play);
        if ((this->unk_2CA == 8) && (gSaveContext.save.saveInfo.bombersCaughtNum >= 5)) {
            func_80C02CA4(this, play);
        } else {
            if (this->unk_2CA == 8) {
                player->stateFlags1 &= ~PLAYER_STATE1_10000000;
            }
            func_80C01FD4(this);
        }
    }
}

void func_80C02BCC(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);

    Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1388, 0);
    if (this->unk_2C0 == 0) {
        player->actor.freezeTimer = 3;
        if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
            Message_CloseTextbox(play);
            this->unk_2C0 = 1;
            player->stateFlags1 &= ~PLAYER_STATE1_10000000;
        }
    } else if (this->actor.xzDistToPlayer > 200.0f) {
        func_80C01494(this);
    }
}

void func_80C02CA4(EnBomjimb* this, PlayState* play) {
    if (BREG(13) == 0) {
        play->nextEntrance = play->setupExitList[this->unk_2B2];
        gSaveContext.nextCutsceneIndex = 0;
        Scene_SetExitFade(play);
        play->transitionTrigger = TRANS_TRIGGER_START;
    } else {
        play->nextEntrance = Entrance_CreateFromSpawn(5);
        gSaveContext.nextCutsceneIndex = 0;
        play->transitionTrigger = TRANS_TRIGGER_START;
        play->transitionType = TRANS_TYPE_86;
        gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
    }
    SET_WEEKEVENTREG(WEEKEVENTREG_75_40);
    SET_WEEKEVENTREG(WEEKEVENTREG_83_04);
    this->actionFunc = func_80C02DAC;
}

void func_80C02DAC(EnBomjimb* this, PlayState* play) {
    Player* player = GET_PLAYER(play);

    player->actor.freezeTimer = 3;
}

void EnBomjimb_Update(Actor* thisx, PlayState* play2) {
    PlayState* play = play2;
    EnBomjimb* this = (EnBomjimb*)thisx;

    if (this->unk_2B0 != 0) {
        this->unk_2B0--;
    }

    if (this->unk_2AE != 0) {
        this->unk_2AE--;
    }

    if (this->unk_2AC != 0) {
        this->unk_2AC--;
    }

    SkelAnime_Update(&this->skelAnime);
    this->actor.shape.rot.y = this->actor.world.rot.y;
    func_80C011CC(this);
    Actor_SetFocus(&this->actor, 20.0f);

    this->actionFunc(this, play);

    Actor_MoveWithGravity(&this->actor);

    if (this->unk_2CA == 0) {
        if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) {
            Math_Vec3f_Copy(&this->unk_2E4->world.pos, &this->actor.world.pos);
            if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
                this->unk_2E4->world.pos.y = this->actor.world.pos.y + 35.0f;
            } else {
                this->unk_2E4->world.pos.y = this->actor.world.pos.y + 25.0f;
            }
        }
    }

    Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 0x1388, 0);

    if (this->unk_2C4 == 0) {
        this->unk_2C2++;
        if (this->unk_2C2 > 2) {
            this->unk_2C2 = 0;
            this->unk_2C4 = TRUNCF_BINANG(Rand_ZeroFloat(60.0f)) + 20;
        }
    }

    Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 50.0f,
                            UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_8 |
                                UPDBGCHECKINFO_FLAG_10);
    Collider_UpdateCylinder(&this->actor, &this->collider);
    CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

    if (this->unk_2CA != 2) {
        CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
    }
}

s32 EnBomjimb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
    EnBomjimb* this = (EnBomjimb*)thisx;

    if (limbIndex == OBJECT_CS_LIMB_0F) {
        *dList = NULL;
    }

    if (limbIndex == OBJECT_CS_LIMB_11) {
        rot->x += this->unk_28A;
        rot->z += this->unk_288;
    }

    if ((limbIndex == OBJECT_CS_LIMB_13) && (this->unk_2C8 != ENBOMJIMB_F_0)) {
        *dList = NULL;
    }

    if ((limbIndex == OBJECT_CS_LIMB_14) && (this->unk_2C8 == ENBOMJIMB_F_0)) {
        *dList = NULL;
    }

    return false;
}

#include "assets/overlays/ovl_En_Bomjimb/ovl_En_Bomjimb.c"

void EnBomjimb_Draw(Actor* thisx, PlayState* play) {
    static Gfx* D_80C03260[] = {
        gBomberCatchRedBandanaDL,  gBomberCatchBlueBandanaDL, gBomberCatchBlueBandanaDL,
        gBomberCatchBlueBandanaDL, gBomberCatchBlueBandanaDL,
    };
    static TexturePtr D_80C03274[] = {
        gBomberEyeOpenTex,
        gBomberEyeHalfTex,
        gBomberEyeClosedTex,
    };
    static TexturePtr D_80C03280[] = {
        gBomberNumber1Tex, gBomberNumber2Tex, gBomberNumber3Tex, gBomberNumber4Tex, gBomberNumber5Tex,
    };
    EnBomjimb* this = (EnBomjimb*)thisx;

    OPEN_DISPS(play->state.gfxCtx);

    Gfx_SetupDL25_Opa(play->state.gfxCtx);
    Gfx_SetupDL25_Xlu(play->state.gfxCtx);

    gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80C03274[this->unk_2C2]));
    gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80C03280[this->unk_2C8]));
    gSPSegment(POLY_OPA_DISP++, 0x0A, Lib_SegmentedToVirtual(D_80C03260[this->unk_2C8]));

    Scene_SetRenderModeXlu(play, 0, 1);
    SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
                          EnBomjimb_OverrideLimbDraw, NULL, &this->actor);

    CLOSE_DISPS(play->state.gfxCtx);
}