#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_getup_seg1_tbl[] = {
    56, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 7, 0, 7, 7, 7, 7, 0, 0, 0, 0
};

s16 cKF_kn_npc_1_getup_seg1_tbl[] = { 2, 6, 5, 4, 6, 2, 7, 7, 5, 2, 8, 2, 2, 9, 5, 4, 9, 5, 2, 7, 2, 2, 8, 2, 2, 5,
                                      2, 2, 5, 2, 4, 7, 3, 6, 6, 6, 6, 7, 2, 5, 6, 7, 6, 6, 2, 2, 2, 2, 6, 7, 4 };

s16 cKF_c_npc_1_getup_seg1_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,   0, 0, 0, -900 };

s16 cKF_ds_npc_1_getup_seg1_tbl[] = {
    1,  0,    0,     41, 0,     0,     1,  700,   0,    20, 700,   0,     24, 850,   1110,  29, 900,  0,
    34, 925,  297,   41, 1000,  0,     1,  -1750, 0,    15, -1750, 0,     20, -1625, 1885,  29, -250, 0,
    41, 0,    0,     1,  0,     557,   10, 0,     557,  20, 50,    0,     41, 0,     0,     1,  -850, 609,
    10, -850, 609,   20, -800,  0,     27, -450,  1103, 34, -350,  1131,  41, 0,     0,     1,  0,    0,
    41, 0,    0,     1,  -250,  524,   10, -250,  524,  15, -100,  0,     20, -100,  0,     29, -200, 0,
    34, -180, 86,    41, -175,  0,     1,  -200,  0,    15, -200,  0,     20, -300,  -1497, 25, -650, -1479,
    29, -750, 0,     34, -600,  2069,  41, -100,  0,    1,  200,   0,     20, 200,   0,     29, 100,  0,
    34, 70,   -334,  41, 25,    0,     1,  0,     0,    41, 0,     0,     1,  400,   0,     10, 400,  0,
    15, 300,  0,     20, 450,   2271,  23, 1048,  0,    27, 663,   -1376, 34, 550,   -732,  41, 200,  0,
    1,  0,    0,     41, 0,     0,     1,  0,     0,    41, 0,     0,     1,  250,   0,     10, 250,  0,
    15, 450,  0,     20, 450,   0,     25, -600,  0,    29, -310,  1667,  31, -250,  0,     34, -295, 0,
    41, -100, 0,     1,  0,     0,     20, 0,     0,    29, 20,    0,     34, 15,    -53,   41, 0,    0,
    1,  100,  0,     20, 100,   0,     27, 140,   206,  41, 175,   0,     1,  -500,  0,     10, -500, 0,
    14, -450, 0,     20, -1200, 0,     25, -150,  6292, 27, 110,   0,     33, -650,  0,     37, -370, 3223,
    41, -100, 0,     1,  -100,  0,     20, -100,  0,    27, -60,   0,     33, -120,  0,     41, -25,  0,
    1,  0,    0,     41, 0,     0,     1,  800,   0,    14, 800,   0,     20, 1450,  0,     27, 150,  0,
    31, 1050, 0,     36, 470,   -2999, 41, 200,   0,    1,  0,     0,     41, 0,     0,     1,  0,    0,
    41, 0,    0,     1,  270,   551,   10, 270,   551,  14, 300,   0,     20, 450,   0,     27, 500,  0,
    31, -560, 0,     34, -400,  3243,  41, -100,  0,    1,  2,     0,     41, 0,     0,     1,  0,    0,
    41, 0,    0,     1,  -22,   0,     6,  -150,  0,    8,  -25,   0,     10, -25,   0,     41, 60,   0,
    1,  0,    0,     41, 0,     0,     1,  0,     0,    41, 0,     0,     1,  -179,  0,     7,  -300, 0,
    9,  -180, 0,     11, -180,  0,     41, 82,    0,    1,  0,     0,     41, 0,     0,     1,  0,    -513,
    10, 0,    -513,  20, -50,   0,     41, 0,     0,    1,  -50,   -625,  10, -50,   -625,  20, -50,  0,
    25, -150, -945,  29, -250,  0,     34, -150,  1482, 41, 2,     -78,   1,  0,     0,     10, 0,    0,
    41, 0,    0,     1,  -850,  0,     10, -850,  990,  20, -400,  0,     25, 200,   4571,  30, 650,  0,
    41, 0,    0,     1,  -150,  0,     10, -150,  512,  20, 100,   0,     25, -250,  -2475, 30, -500, 0,
    41, 58,   0,     1,  0,     0,     10, 0,     0,    20, 50,    0,     25, -103,  -1703, 30, -400, 0,
    41, -564, 0,     1,  0,     0,     10, 0,     0,    20, -300,  0,     26, -300,  0,     35, 0,    0,
    41, 0,    0,     1,  -400,  0,     10, -400,  0,    20, -1050, 0,     25, -550,  5770,  30, -100, 0,
    36, -400, 0,     41, -57,   468,   1,  0,     0,    41, 0,     0,     1,  850,   0,     10, 850,  0,
    23, 30,   -4007, 32, -450,  0,     41, 0,     0,    1,  -150,  0,     15, -150,  0,     20, 100,  0,
    23, -100, -3446, 32, -450,  0,     41, 58,    0,    1,  -138,  467,   10, -138,  467,   15, -50,  0,
    20, -50,  0,     23, 50,    1859,  32, 450,   0,    41, 564,   0,     1,  0,     0,     10, 0,    0,
    20, 300,  0,     26, 300,   0,     35, 0,     0,    41, 0,     0,     1,  -400,  -1691, 10, -400, -1691,
    20, -950, 0,     26, -350,  2878,  31, -100,  0,    41, -57,   468,   1,  0,     0,     41, 0,    0,
    1,  -104, -800,  41, 920,   0,     1,  386,   1414, 41, 0,     0,     1,  -181,  -814,  41, -135, 0,
    1,  550,  0,     5,  500,   0,     10, 500,   0,    21, 0,     0,     26, 0,     0,     41, 0,    0,
    1,  400,  0,     5,  500,   0,     7,  450,   0,    21, 450,   0,     29, 150,   0,     36, 50,   -799,
    41, 0,    0,     1,  0,     0,     21, 0,     0,    30, 10,    70,    41, 0,     -273
};

u8 npc_1_getup_seg11_tex_index[] = { 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

aNPC_Animation_c cKF_ba_r_npc_1_getup_seg1 = {
    { cKF_ckcb_r_npc_1_getup_seg1_tbl, cKF_ds_npc_1_getup_seg1_tbl, cKF_kn_npc_1_getup_seg1_tbl,
      cKF_c_npc_1_getup_seg1_tbl, -1, 41 },
    1.0f,
    41.0f,
    cKF_FRAMECONTROL_STOP,
    -8.0f,
    npc_1_getup_seg11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
