#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_standup_d1_tbl[] = {
    62, 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_standup_d1_tbl[] = { 2, 6, 5, 2, 2, 5, 7, 6, 4, 8, 7, 2, 9, 2, 2, 2, 2, 6, 8,
                                      8, 2, 7, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 6, 5, 5, 6, 7, 7,
                                      2, 7, 2, 6, 8, 5, 2, 7, 2, 2, 2, 2, 6, 7, 5, 2, 2, 2 };

s16 cKF_c_npc_1_standup_d1_tbl[] = { 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_standup_d1_tbl[] = {
    1,  0,    0,     27, 0,    0,     1,  2400, 0,     10, 2600, -2927, 17, 975,  -9067, 18, 825,  0,
    25, 1000, 0,     27, 1000, 0,     1,  0,    0,     11, 1250, 4945,  18, 1950, 449,   22, 2000, 0,
    27, 2000, 0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,     1,  0,    0,
    7,  0,    0,     12, -200, 0,     18, 0,    0,     27, 0,    0,     1,  80,   0,     7,  500,  599,
    12, 400,  -2279, 15, 50,   -2498, 18, -100, 0,     22, 0,    0,     27, 0,    0,     1,  0,    0,
    7,  0,    0,     12, -200, 0,     15, -80,  1377,  18, 0,    0,     27, 0,    0,     1,  -750, 0,
    12, -50,  0,     16, -50,  0,     27, -175, 0,     1,  -500, 0,     4,  -590, 1767,  7,  -300, 1098,
    12, -300, 586,   16, -100, 0,     18, -500, 0,     20, -390, 3341,  27, -100, 0,     1,  300,  0,
    9,  80,   1524,  12, 200,  0,     14, 180,  -924,  16, 80,   -895,  20, 60,   0,     27, 25,   0,
    1,  0,    0,     27, 0,    0,     1,  350,  0,     4,  0,    0,     7,  100,  2084,  9,  400,  2933,
    12, 500,  -787,  16, 0,    0,     18, 800,  0,     20, 700,  -2600, 27, 200,  0,     1,  0,    0,
    27, 0,    0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,     1,  0,    0,
    27, 0,    0,     1,  750,  0,     10, 150,  2694,  16, 500,  0,     18, 250,  -5306, 20, 100,  0,
    27, 175,  0,     1,  -500, 0,     3,  -700, 240,   6,  -507, 1456,  10, -500, -1374, 16, -800, 0,
    18, -620, 2899,  20, -390, 3351,  27, -100, 0,     1,  -300, 0,     3,  100,  0,     10, 0,    -877,
    13, -150, -2275, 16, -400, 0,     18, -150, 2672,  20, -60,  546,   27, -25,  0,     1,  0,    0,
    27, 0,    0,     1,  350,  0,     5,  600,  0,     9,  170,  0,     16, 500,  4359,  18, 800,  0,
    20, 700,  -2571, 27, 200,  0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,
    1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,
    1,  -250, 0,     12, -650, 0,     27, 60,   0,     1,  0,    0,     27, 0,    0,     1,  0,    0,
    27, 0,    0,     1,  -100, 0,     27, 82,   0,     1,  0,    0,     27, 0,    0,     1,  0,    0,
    4,  -100, 0,     7,  0,    1113,  13, 100,  -160,  19, 0,    0,     27, 0,    0,     1,  -100, 0,
    7,  -530, 0,     16, 150,  0,     22, -100, 0,     27, 2,    0,     1,  0,    0,     4,  -50,  0,
    13, 150,  0,     19, 0,    0,     27, 0,    0,     1,  0,    0,     4,  100,  0,     11, 400,  1845,
    13, 450,  0,     20, 0,    0,     27, 0,    0,     1,  50,   0,     4,  -385, 456,   8,  50,   4014,
    11, 450,  4056,  13, 700,  0,     20, -100, 0,     27, 58,   0,     1,  -650, 0,     4,  -385, -493,
    8,  -540, 0,     11, -450, 4227,  13, -100, 0,     20, -450, 0,     27, -414, 0,     1,  0,    0,
    27, 0,    0,     1,  -250, 0,     4,  -100, 0,     8,  -450, -1513, 10, -500, 0,     15, -100, 948,
    22, -250, 364,   27, -57,  0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     5,  0,    976,
    8,  -50,  -2643, 11, -350, 0,     17, 100,  994,   27, 0,    0,     1,  50,   0,     5,  -400, 0,
    8,  150,  5811,  11, 600,  2181,  15, 500,  -3052, 19, 0,    -2157, 22, -90,  0,     27, 58,   0,
    1,  650,  0,     5,  725,  0,     10, 500,  -2033, 17, 250,  1344,  27, 414,  0,     1,  0,    0,
    27, 0,    0,     1,  -250, 0,     5,  -50,  0,     8,  -350, -2277, 11, -430, 0,     14, -50,  952,
    23, -190, 369,   27, -57,  0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,
    1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0,     1,  0,    0,     5,  100,  0,
    7,  0,    0,     13, 100,  0,     19, 30,   -290,  27, 0,    0,     1,  0,    0,     7,  -100, -209,
    15, -90,  477,   20, 0,    0,     22, -40,  -403,  25, -40,  405,   27, 0,    0,     1,  0,    0,
    7,  -40,  -158,  12, -50,  0,     19, -20,  191,   27, 0,    0,     1,  0,    0,     27, 0,    0,
    1,  0,    0,     27, 0,    0,     1,  0,    0,     27, 0,    0
};

static int other_se_chk_pat[] = { 17 };

static aNPC_other_se_data_c other_se_dt[] = { { { ARRAY_COUNT(other_se_chk_pat), other_se_chk_pat }, 1067 } };

static aNPC_se_data_table_c se_dt_tbl[] = { { NULL, NULL, aNPC_OTHER_SE_TYPE1, other_se_dt } };

aNPC_Animation_c cKF_ba_r_npc_1_standup_d1 = {
    { cKF_ckcb_r_npc_1_standup_d1_tbl, cKF_ds_npc_1_standup_d1_tbl, cKF_kn_npc_1_standup_d1_tbl,
      cKF_c_npc_1_standup_d1_tbl, -1, 27 },
    1.0f,
    27.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
