#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_umb_open1_tbl[] = { 24, 3, 0, 7, 2, 3, 0, 7, 2, 3, 0, 0, 0, 6, 0, 7, 2, 0, 7, 7, 7, 7, 0, 0, 0, 0 };

s16 cKF_kn_npc_1_umb_open1_tbl[] = { 9, 7, 7,  8, 7,  11, 7,  11, 11, 5, 10, 11, 10, 13, 12, 7,  8,
                                     7, 9, 12, 7, 15, 12, 12, 8,  5,  6, 6,  14, 14, 14, 10, 11, 8 };

s16 cKF_c_npc_1_umb_open1_tbl[] = { 0, 0, 0,   900, 0,    0,  0, 1800, 0,  0, 0, 0, 0, 1800, 0,   0,
                                    0, 0, 900, 0,   0,    60, 0, 0,    82, 0, 0, 0, 0, -900, 0,   0,
                                    0, 0, 900, 0,   -900, 0,  0, 0,    0,  0, 0, 0, 0, 0,    -900 };

s16 cKF_ds_npc_1_umb_open1_tbl[] = {
    1,  1000,  -42,   5,  985,  -153,  9,  978,  132,   12, 997,  132,   14, 1010, 528,   17, 1090,  528,
    21, 1068,  -516,  25, 1004, -234,  26, 1000, -129,  1,  0,    0,     12, 0,    0,     14, 10,    528,
    17, 90,    528,   21, 68,   -516,  25, 4,    -234,  26, 0,    -129,  1,  0,    83,    3,  10,    254,
    9,  45,    -254,  13, -15,  -378,  18, -40,  17,    25, -2,   94,    26, 0,    52,    1,  0,     83,
    3,  10,    254,   7,  47,   149,   9,  43,   -343,  12, -8,   -343,  16, -5,   122,   22, 0,     0,
    26, 0,     0,     1,  -175, 0,     12, -175, 0,     14, -185, -528,  17, -265, -528,  21, -243,  516,
    25, -179,  234,   26, -175, 129,   1,  -100, 91,    3,  -89,  279,   7,  -48,  164,   9,  -53,   -400,
    12, -115,  -456,  13, -125, 11,    14, -114, 626,   17, -13,  682,   20, -16,  -410,  25, -96,   -234,
    26, -100,  -129,  1,  25,   -100,  3,  13,   -304,  9,  -29,  317,   12, 19,   317,   17, 3,     -132,
    25, 24,    59,    26, 25,   32,    1,  200,  -25,   7,  186,  -45,   9,  189,  211,   12, 221,   211,
    13, 225,   -289,  14, 202,  -1188, 17, 23,   -1188, 18, 0,    -222,  19, 9,    469,   25, 191,   469,
    26, 200,   258,   1,  -100, 17,    7,  -91,  30,    9,  -93,  -132,  12, -112, -132,  13, -115,  187,
    14, -100,  766,   17, 15,   766,   18, 30,   142,   19, 24,   -305,  25, -94,  -305,  26, -100,  -168,
    1,  0,     17,    8,  10,   32,    13, 25,   8,     18, 15,   -25,   26, 0,    -19,   1,  175,   241,
    2,  183,   431,   7,  312,  431,   10, 313,  -163,  12, 302,  -106,  14, 297,  -132,  17, 278,   -132,
    19, 271,   -234,  25, 179,  -234,  26, 175,  -129,  1,  -100, -83,   3,  -110, -254,  7,  -147,  -149,
    8,  -150,  91,    9,  -141, 449,   12, -74,  449,   14, -58,  343,   17, -7,   343,   19, -4,    -234,
    25, -96,   -234,  26, -100, -129,  1,  -25,  -191,  2,  -31,  -342,  7,  -134, -342,  8,  -140,  84,
    10, -100,  938,   12, -37,  607,   14, -22,  132,   18, 0,    23,    25, -24,  -59,   26, -25,   -32,
    1,  200,   457,   2,  215,  818,   7,  460,  818,   8,  475,  -349,  9,  437,  -1954, 11, 235,   -3019,
    12, 143,   -1954, 13, 105,  -741,  14, 94,   -554,  17, 11,   -554,  18, 0,    -35,   25, 191,   469,
    26, 200,   258,   1,  -100, -258,  2,  -109, -461,  7,  -246, -461,  8,  -255, 203,   9,  -233,  1122,
    12, -65,   1122,  13, -43,  445,   14, -35,  383,   17, 22,   383,   18, 30,   29,    25, -94,   -305,
    26, -100,  -168,  1,  0,    -50,   5,  -18,  -184,  9,  -26,  211,   13, 10,   23,    17, -12,   -132,
    22, -8,    83,    26, 0,    19,    1,  0,    499,   2,  17,   892,   7,  283,  892,   8,  300,   219,
    9,  298,   -116,  20, 99,   -765,  25, 4,    -213,  26, 0,    -113,  1,  2,    0,     7,  2,     0,
    9,  -3,    -221,  13, -40,  -11,   18, 0,    134,   23, 4,    -22,   26, 2,    -9,    1,  0,     381,
    2,  13,    700,   9,  357,  700,   10, 370,  -150,  11, 347,  -1182, 13, 219,  -2118, 14, 150,   -1873,
    25, -2,    93,    26, 0,    55,    1,  58,   164,   2,  63,   281,   9,  61,   -1473, 13, -336,  -4514,
    14, -500,  -5190, 15, -682, -5034, 16, -836, -3264, 17, -900, -473,  18, -867, 1813,  22, -342,  4650,
    25, 25,    1813,  26, 58,   985,   1,  -564, 145,   2,  -559, 274,   11, -327, 606,   16, -277,  64,
    18, -281,  -260,  25, -409, -260,  26, -414, -141,  1,  -55,  -521,  2,  -72,  -974,  8,  -576,  -2787,
    11, -783,  -974,  12, -800, 322,   13, -761, 2016,  15, -544, 3552,  16, -429, 2916,  17, -350,  1506,
    19, -349,  -936,  21, -432, -888,  22, -450, 645,   23, -389, 2948,  25, -118, 2948,  26, -57,   1842,
    1,  0,     -4458, 4,  -400, -2976, 9,  -599, -114,  11, -579, 1203,  15, -203, 3682,  19, 233,   1995,
    20, 283,   1009,  21, 300,  -479,  22, 251,  -2482, 24, -5,   -3835, 25, -121, -2482, 26, -170,  -1466,
    1,  58,    -2583, 3,  -112, -2463, 7,  -425, -2266, 11, -660, -686,  13, -650, 1130,  18, -200,  2987,
    19, -105,  2550,  21, 0,    -119,  22, -38,  -1927, 24, -237, -2978, 25, -327, -1927, 26, -365,  -1139,
    1,  564,   -1007, 3,  508,  -456,  9,  565,  272,   11, 560,  -563,  17, 340,  -563,  19, 339,   492,
    25, 531,   492,   26, 540,  271,   1,  0,    0,     7,  0,    0,     9,  -6,   -346,  13, -100,  -746,
    26, -200,  3,     1,  -57,  -206,  2,  -64,  -395,  12, -547, -1645, 15, -701, -1500, 25, -1051, -240,
    26, -1055, -123,  1,  0,    0,     7,  0,    0,     9,  9,    484,   14, 191,  1177,  25, 418,   91,
    26, 420,   45,    1,  0,    50,    5,  18,   184,   7,  28,   89,    8,  30,   -1025, 9,  -40,   -2214,
    10, -118,  -2009, 14, -200, 892,   17, -5,   2869,  18, 100,  3295,  20, 310,  2025,  21, 350,   151,
    23, 250,   -2326, 25, 95,   -1505, 26, 65,   -889,  1,  0,    396,   2,  13,   742,   7,  324,   2309,
    8,  400,   3388,  9,  550,  5203,  10, 747,  6042,  12, 1141, 4954,  13, 1283, 3186,  14, 1353,  832,
    17, 1123,  -4524, 20, 577,  -5513, 22, 246,  -4239, 25, -43,  -1266, 26, -65,  -658,  1,  0,     166,
    2,  6,     297,   7,  94,   297,   8,  100,  -1417, 10, -138, -3732, 13, -382, -1032, 14, -400,  -56,
    18, -248,  1531,  20, -164, 743,   21, -150, -533,  22, -199, -2508, 24, -458, -3876, 25, -576,  -2508,
    26, -625,  -1482, 1,  0,    279,   2,  9,    498,   6,  130,  792,   7,  153,  602,   9,  174,   -146,
    14, 5,     -1294, 19, -145, -315,  21, -139, 583,   25, -11,  583,   26, 0,    333,   1,  0,     -499,
    2,  -17,   -892,  8,  -300, 47,    10, -231, 1711,  12, -101, 1743,  13, -50,  1322,  14, -13,   1045,
    19, 96,    206,   21, 93,   -389,  25, 7,    -389,  26, 0,    -222,  1,  0,    -125,  2,  -4,    -223,
    8,  -75,   16,    13, -25,  49,    17, -46,  -214,  21, -56,  233,   25, -4,   233,   26, 0,     133
};

aNPC_Animation_c cKF_ba_r_npc_1_umb_open1 = {
    { cKF_ckcb_r_npc_1_umb_open1_tbl, cKF_ds_npc_1_umb_open1_tbl, cKF_kn_npc_1_umb_open1_tbl, cKF_c_npc_1_umb_open1_tbl,
      -1, 26 },
    1.0f,
    26.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
