#include "libforest/gbi_extensions.h"
#include "PR/gbi.h"
#include "evw_anime.h"
#include "c_keyframe.h"
#include "ac_npc.h"
#include "ef_effect_control.h"

u8 cKF_ckcb_r_npc_1_cracker_wait1_tbl[] = { 56, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7,
                                            7,  0, 7, 7, 0, 7, 7, 7, 7, 0, 7, 0, 0 };

s16 cKF_kn_npc_1_cracker_wait1_tbl[] = { 6, 6,  2, 6, 2,  2,  10, 10, 10, 2, 10, 2, 2, 10, 10, 10, 10, 10,
                                         2, 10, 2, 2, 10, 10, 2,  13, 2,  2, 13, 6, 6, 6,  2,  5,  5,  5,
                                         2, 5,  2, 5, 5,  5,  2,  5,  2,  2, 2,  2, 6, 2,  6,  2,  6,  2 };

s16 cKF_c_npc_1_cracker_wait1_tbl[] = { 0,    0, 900, 0,   0, 1800, 0, 0, 1800, 0, 900, 0, 0,   0,
                                        -900, 0, 0,   900, 0, -900, 0, 0, 0,    0, 0,   0, -900 };

s16 cKF_ds_npc_1_cracker_wait1_tbl[] = {
    1,  -50,   -893,  4,  -100, 0,     10, -100, 2,     18, 100,  0,     27, 100,  0,    33, -50,   -944,
    1,  950,   300,   4,  975,  0,     10, 900,  0,     18, 975,  0,     27, 900,  0,    33, 950,   300,
    1,  0,     0,     33, 0,    0,     1,  -24,  -446,  4,  -50,  0,     10, -50,  0,    18, 50,    0,
    27, 50,    0,     33, -24,  -446,  1,  50,   0,     33, 50,   0,     1,  0,    0,    33, 0,     0,
    1,  -181,  -40,   4,  -195, 0,     7,  -186, 65,    10, -184, 0,     14, -180, 101,  18, -141,  0,
    23, -166,  -203,  27, -185, 0,     30, -181, 22,    33, -181, -40,   1,  -141, 666,  4,  -69,   0,
    7,  -141,  -991,  10, -194, 0,     14, -171, 491,   18, -95,  0,     23, -178, -610, 27, -220,  0,
    30, -201,  383,   33, -141, 666,   1,  80,   459,   4,  95,   0,     7,  120,  367,  10, 138,   0,
    14, 50,    -1085, 18, -50,  0,     23, -26,  196,   27, -10,  0,     30, 23,   554,  33, 80,    459,
    1,  0,     0,     33, 0,    0,     1,  415,  -1169, 4,  280,  0,     7,  444,  2221, 10, 560,   0,
    14, 463,   -1469, 18, 270,  0,     23, 455,  1274,  27, 551,  0,     30, 516,  -683, 33, 415,   -1169,
    1,  0,     0,     33, 0,    0,     1,  0,    0,     33, 0,    0,     1,  -206, 718,  4,  -134,  0,
    7,  -221,  -1084, 10, -284, 0,     14, -236, 762,   18, -140, 0,     23, -241, -731, 27, -293,  0,
    30, -269,  466,   33, -206, 718,   1,  -19,  -579,  4,  -55,  0,     7,  -63,  -90,  10, -68,   0,
    14, 20,    844,   18, 90,   0,     23, 100,  98,    27, 110,  0,     30, 61,   -772, 33, -19,   -579,
    1,  169,   -238,  4,  143,  0,     7,  164,  351,   10, 186,  0,     14, 180,  24,   18, 194,   0,
    23, 189,   -43,   27, 185,  0,     30, 185,  -62,   33, 169,  -238,  1,  -154, 592,  4,  -95,   0,
    7,  -166,  -1004, 10, -220, 0,     14, -169, 860,   18, -68,  0,     23, -149, -673, 27, -194,  0,
    30, -190,  157,   33, -154, 592,   1,  -5,   897,   4,  50,   0,     7,  30,   -300, 10, 10,    0,
    14, -50,   -630,  18, -95,  0,     23, -123, -203,  27, -138, 0,     30, -95,  787,  33, -5,    897,
    1,  0,     0,     33, 0,    0,     1,  409,  -1563, 4,  269,  0,     7,  429,  2283, 10, 551,   0,
    14, 459,   -1474, 18, 279,  0,     23, 460,  1438,  27, 561,  0,     30, 525,  -883, 33, 409,   -1563,
    1,  0,     0,     33, 0,    0,     1,  0,    0,     33, 0,    0,     1,  -210, 727,  4,  -140,  0,
    7,  -229,  -1083, 10, -293, 0,     14, -235, 833,   18, -134, 0,     23, -231, -652, 27, -284,  0,
    30, -268,  397,   33, -210, 727,   1,  -58,  -915,  4,  -93,  0,     7,  -100, -94,  10, -111,  0,
    14, -21,   872,   18, 55,   0,     23, 61,   42,    27, 68,   0,     30, 19,   -679, 33, -58,   -915,
    1,  0,     0,     33, 0,    0,     1,  0,    0,     3,  -113, -1096, 5,  -150, 0,    9,  0,     0,
    11, -113,  -1141, 13, -150, 0,     17, 0,    0,     19, -113, -1103, 21, -150, 0,    25, 0,     0,
    27, -113,  -1155, 29, -150, 0,     33, 0,    0,     1,  0,    0,     33, 0,    0,    1,  0,     0,
    33, 0,     0,     1,  -161, 4707,  3,  100,  0,     7,  -300, 0,     9,  -235, 1812, 11, 100,   0,
    15, -300,  0,     17, -235, 1998,  19, 100,  0,     23, -300, 0,     25, -235, 2001, 27, 100,   0,
    31, -300,  0,     33, -161, 4707,  1,  -16,  -1089, 5,  -100, 0,     13, 100,  0,    21, -100,  0,
    29, 100,   0,     33, -16,  -1089, 1,  -175, 0,     8,  -175, 0,     13, 175,  0,    24, 175,   0,
    29, -175,  0,     33, -175, 0,     1,  -303, 278,   8,  -250, 0,     13, -325, 0,    24, -250,  0,
    29, -325,  0,     33, -303, 278,   1,  0,    0,     33, 0,    0,     1,  525,  0,    9,  525,   0,
    17, 325,   0,     25, 325,  0,     33, 525,  0,     1,  -700, 0,     9,  -700, 0,    17, -500,  0,
    25, -500,  0,     33, -700, 0,     1,  -800, 0,     9,  -800, 0,     17, -700, 0,    25, -700,  0,
    33, -800,  0,     1,  0,    0,     33, 0,    0,     1,  -550, 0,     9,  -550, 0,    17, -750,  0,
    25, -750,  0,     33, -550, 0,     1,  0,    0,     33, 0,    0,     1,  50,   0,    9,  50,    0,
    17, 0,     0,     25, 0,    0,     33, 50,   0,     1,  -900, 0,     9,  -900, 0,    17, -1000, 0,
    25, -1000, 0,     33, -900, 0,     1,  150,  0,     9,  150,  0,     17, -75,  0,    25, -75,   0,
    33, 150,   0,     1,  0,    0,     33, 0,    0,     1,  -200, 0,     9,  -200, 0,    17, -250,  0,
    25, -250,  0,     33, -200, 0,     1,  0,    0,     33, 0,    0,     1,  0,    0,    33, 0,     0,
    1,  900,   0,     33, 900,  0,     1,  -650, 0,     33, -650, 0,     1,  -250, 0,    7,  -250,  0,
    13, 250,   0,     23, 250,  0,     29, -250, 0,     33, -250, 0,     1,  225,  0,    33, 225,   0,
    1,  30,    154,   7,  50,   0,     11, 0,    0,     23, -50,  0,     27, 0,    0,    33, 30,    144,
    1,  0,     0,     33, 0,    0,     1,  -220, 311,   8,  -150, 0,     13, -250, 0,    24, -150,  0,
    29, -250,  0,     33, -220, 311,   1,  0,    0,     33, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_cracker_wait1 = {
    { cKF_ckcb_r_npc_1_cracker_wait1_tbl, cKF_ds_npc_1_cracker_wait1_tbl, cKF_kn_npc_1_cracker_wait1_tbl,
      cKF_c_npc_1_cracker_wait1_tbl, -1, 33 },
    1.0f,
    33.0f,
    cKF_FRAMECONTROL_REPEAT,
    -8.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    2,
    -1,
    -1,
    NULL,
    NULL,
};
