#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_open_d2_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_open_d2_tbl[] = { 6, 6,  5, 5, 2, 2, 9, 10, 10, 2, 11, 2, 2, 2, 2, 7, 11, 10,
                                   2, 11, 2, 2, 2, 2, 5, 9,  6,  2, 7,  6, 5, 5, 2, 2, 8,  7,
                                   2, 2,  2, 2, 6, 6, 2, 2,  2,  2, 2,  2, 7, 7, 2, 2, 2,  2 };

s16 cKF_c_npc_1_open_d2_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_open_d2_tbl[] = {
    1,  -1000, 0,    17, 400,   0,     24, 250,   -1899, 32, -200, 0,    65, 0,    0,    91, 0,    0,
    1,  1000,  0,    7,  1150,  0,     13, 1000,  0,     19, 1150, 0,    25, 1000, 0,    91, 1000, 0,
    1,  6000,  0,    24, 5000,  0,     55, 1500,  -3424, 82, 0,    0,    91, 0,    0,    1,  -450, 0,
    22, -1850, 0,    41, -950,  2079,  65, 500,   754,   91, 1800, 0,    1,  0,    0,    91, 0,    0,
    1,  0,     0,    91, 0,     0,     1,  -175,  0,     22, -175, 0,    31, -175, 187,  34, -160, 0,
    41, -350,  0,    54, -200,  0,     68, -360,  0,     74, -260, 476,  91, -175, 0,    1,  -100, 0,
    22, -100,  0,    31, -60,   399,   34, 0,     398,   41, 50,   387,  48, 200,  0,    61, -200, 0,
    68, 100,   619,  71, 125,   -235,  91, -100,  0,     1,  25,   0,    22, 25,   0,    31, -25,  0,
    41, 250,   0,    48, -40,   0,     54, 60,    0,     61, 0,    0,    68, 60,   0,    74, -20,  0,
    91, 25,    0,    1,  0,     0,     91, 0,     0,     1,  200,  0,    22, 200,  0,    31, 150,  0,
    34, 180,   0,    41, 0,     0,     48, 320,   0,     54, 0,    0,    68, 220,  0,    74, 160,  0,
    80, 180,   110,  91, 200,   0,     1,  0,     0,     91, 0,    0,    1,  0,    0,    91, 0,    0,
    1,  -100,  0,    91, -100,  0,     1,  0,     0,     91, 0,    0,    1,  175,  0,    31, 175,  0,
    38, 200,   0,    51, -100,  0,     64, 70,    0,     78, -75,  0,    91, 175,  0,    1,  -100, 0,
    22, -100,  0,    31, -150,  -469,  38, -350,  0,     41, -300, 560,  51, -200, 419,  58, 70,   0,
    64, -60,   -508, 71, -50,   -3,    78, -100,  0,     91, -100, 0,    1,  -25,  0,    31, -25,  0,
    38, -200,  0,    44, 180,   0,     51, 75,    -896,  58, 0,    -248, 64, -110, -573, 71, -100, 507,
    78, 50,    0,    91, -25,   0,     1,  0,     0,     91, 0,    0,    1,  200,  0,    22, 0,    0,
    33, 0,     0,    41, 400,   0,     44, 350,   -1405, 51, 0,    0,    58, 200,  0,    64, 100,  0,
    71, 200,   0,    78, 0,     0,     91, 200,   0,     1,  0,    0,    91, 0,    0,    1,  0,    0,
    91, 0,     0,    1,  -100,  0,     91, -100,  0,     1,  0,    0,    91, 0,    0,    1,  0,    0,
    21, 100,   0,    36, -100,  -924,  56, -300,  0,     91, 0,    0,    1,  60,   0,    11, 100,  0,
    29, -200,  0,    39, 0,     1269,  48, 200,   0,     60, -100, -955, 68, -200, 0,    81, -50,  623,
    91, 60,    0,    1,  0,     0,     21, 100,   0,     40, -400, 0,    57, 0,    0,    68, -200, 0,
    91, 0,     0,    1,  0,     0,     91, 0,     0,     1,  82,   0,    14, 120,  0,    32, -250, 0,
    52, 250,   0,    63, -170,  -1116, 72, -310,  -6,    91, 82,   0,    1,  0,    0,    24, 100,  0,
    43, -400,  0,    60, -50,   0,     78, -460,  0,     91, 0,    0,    1,  0,    0,    22, -100, 0,
    35, 100,   0,    47, -100,  0,     91, 0,     0,     1,  2,    0,    22, 100,  0,    65, 100,  0,
    78, 30,    -154, 91, 2,     0,     1,  0,     0,     91, 0,    0,    1,  0,    0,    91, 0,    0,
    1,  58,    0,    22, -1050, 0,     28, -1050, 0,     41, -750, 1297, 54, 60,   718,  65, 150,  0,
    78, 60,    0,    91, 58,    0,     1,  -564,  240,   22, 0,    0,    41, 0,    0,    54, -570, 0,
    65, -450,  0,    78, -570,  0,     91, -564,  240,   1,  0,    0,    91, 0,    0,    1,  -57,  0,
    91, -57,   0,    1,  0,     0,     91, 0,     0,     1,  0,    0,    91, 0,    0,    1,  58,   0,
    35, 58,    0,    47, -750,  -1489, 65, -1050, 0,     78, 60,   0,    91, 58,   0,    1,  564,  0,
    35, 564,   0,    47, 0,     0,     65, 0,     0,     78, 570,  0,    91, 564,  0,    1,  0,    0,
    91, 0,     0,    1,  -57,   0,     91, -57,   0,     1,  0,    0,    91, 0,    0,    1,  0,    0,
    91, 0,     0,    1,  0,     0,     91, 0,     0,     1,  0,    0,    91, 0,    0,    1,  0,    0,
    22, -50,   -263, 35, -300,  0,     47, -100,  408,   65, 50,   334,  78, 300,  0,    91, 0,    0,
    1,  0,     0,    18, -50,   0,     35, 0,     0,     50, -50,  0,    65, 0,    0,    78, -50,  0,
    91, 0,     0,    1,  0,     0,     91, 0,     0,     1,  0,    0,    91, 0,    0,    1,  0,    0,
    91, 0,     0,    1,  0,     0,     91, 0,     0
};

aNPC_Animation_c cKF_ba_r_npc_1_open_d2 = {
    { cKF_ckcb_r_npc_1_open_d2_tbl, cKF_ds_npc_1_open_d2_tbl, cKF_kn_npc_1_open_d2_tbl, cKF_c_npc_1_open_d2_tbl, -1,
      91 },
    1.0f,
    91.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
