#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_go_out1_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_go_out1_tbl[] = { 5, 4,  6, 5, 6,  2,  17, 18, 17, 2, 18, 2, 3, 24, 21, 14, 16, 17,
                                   2, 20, 2, 2, 19, 20, 7,  7,  8,  2, 2,  7, 9, 10, 10, 5,  5,  5,
                                   2, 5,  2, 6, 8,  6,  2,  7,  2,  2, 2,  2, 8, 2,  2,  2,  2,  2 };

s16 cKF_c_npc_1_go_out1_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_go_out1_tbl[] = {
    1,  0,     -4215, 17, -1250, -1080, 32, -1550, 0,      44, -750,  3819,  59, 0,     0,     1,  1000,  0,
    7,  1100,  0,     42, 1100,  0,     59, 1000,  0,      1,  -6800, 0,     16, -2500, 11561, 29, 300,   1052,
    35, 0,     -3776, 44, -1500, 0,     59, 0,     0,      1,  -3700, 0,     13, -3200, 2490,  25, -2200, 1393,
    33, -1800, 1858,  59, 0,     0,     1,  0,     0,      13, -150,  0,     25, -100,  256,   30, -50,   347,
    40, 50,    0,     59, 0,     0,     1,  0,     0,      59, 0,     0,     1,  600,   -366,  12, -146,  -3020,
    13, -233,  -1473, 21, -250,  1488,  25, 161,   0,      27, 63,    0,     29, 135,   0,     30, 121,   -309,
    34, 8,     -1621, 35, -85,   -2527, 36, -200,  -1017,  38, -268,  -1297, 40, -365,  657,   41, -345,  0,
    49, -460,  -312,  53, -381,  2201,  59, -175,  0,      1,  -300,  0,     10, -300,  0,     11, -170,  5895,
    12, 41,    5454,  13, 131,   1181,  21, 250,   0,      26, 114,   -364,  27, 110,   -148,  28, 34,    -1993,
    31, -100,  -654,  32, -123,  -1005, 33, -190,  0,      35, -106,  2138,  36, 16,    491,   37, 20,    -178,
    41, -9,    -297,  53, -227,  0,     59, -100,  0,      1,  -300,  516,   12, -43,   897,   13, 45,    0,
    21, -150,  0,     25, -10,   758,   27, 36,    614,    28, 64,    766,   31, 30,    -927,  33, -53,   -974,
    35, -85,   -497,  36, -109,  0,     37, -69,   1664,   40, 134,   2290,  41, 213,   908,   50, 200,   -662,
    55, 50,    -763,  59, 25,    0,     1,  0,     0,      59, 0,     0,     1,  0,     0,     10, 0,     0,
    11, 108,   0,     12, 0,     0,     13, 0,     0,      21, 500,   0,     26, 150,   -4943, 27, 0,     0,
    32, 0,     0,     33, 178,   1041,  35, 194,   -208,   36, 65,    0,     38, 196,   0,     39, 189,   -577,
    41, 0,     0,     46, 300,   0,     53, 0,     0,      59, 200,   0,     1,  0,     0,     59, 0,     0,
    1,  0,     0,     37, 0,     0,     59, 0,     0,      1,  200,   0,     10, 215,   0,     11, -65,   -3130,
    12, -106,  0,     13, -45,   0,     21, -335,  -527,   23, -359,  0,     26, -173,  4116,  27, -45,   2061,
    29, 63,    1307,  31, 130,   519,   32, 150,   0,      33, 33,    -2471, 34, -31,   -1732, 35, -114,  -832,
    36, -136,  -814,  37, -189,  -1383, 38, -210,  0,      40, 21,    6423,  41, 179,   0,     46, -123,  122,
    53, 200,   0,     56, 80,    -1836, 59, -100,  0,      1,  50,    0,     10, 68,    0,     11, 8,     -2396,
    12, -77,   -3467, 13, -236,  0,     21, -150,  1045,   23, -16,   0,     25, -50,   -379,  27, -75,   -463,
    29, -116,  0,     30, -104,  709,   31, -65,   1427,   34, 70,    1034,  35, 96,    0,     37, 25,    -1579,
    40, -158,  -1081, 41, -198,  0,     46, -125,  716,    50, 2,     497,   56, 30,    -109,  59, -5,    0,
    1,  800,   0,     9,  100,   0,     16, 26,    -959,   17, -105,  -2134, 19, -160,  -1159, 20, -244,  0,
    33, 432,   1798,  34, 513,   0,     39, -200,  -3589,  40, -287,  -1392, 44, 56,    3328,  49, 441,   1618,
    51, 524,   0,     59, 175,   0,     1,  400,   0,      9,  -100,  -2992, 14, -500,  -304,  16, -521,  -283,
    17, -575,  1018,  19, -469,  2493,  20, -289,  0,      33, 107,   3102,  34, 201,   0,     39, -149,  0,
    40, -116,  1524,  46, -249,  0,     47, -199,  3103,   49, 3,     3164,  51, 215,   0,     59, -100,  0,
    1,  0,     0,     9,  -250,  -1762, 14, -553,  0,      16, -319,  6145,  17, -118,  5001,  18, 25,    3881,
    19, 128,   0,     20, 104,   -1051, 31, -211,  -248,   33, -159,  1327,  34, -114,  0,     39, -300,  0,
    42, -74,   3684,  44, 2,     -491,  47, -230,  -1691,  51, -370,  0,     59, -25,   0,     1,  0,     0,
    59, 0,     0,     1,  0,     4377,  4,  400,   3713,   9,  672,   0,     14, 311,   -447,  16, 299,   482,
    17, 563,   2583,  18, 594,   0,     19, 445,   -10633, 20, 5,     0,     31, 237,   -1596, 34, 12,    0,
    37, 450,   0,     40, 266,   0,     42, 367,   3239,   43, 419,   637,   46, 449,   0,     47, 390,   -2572,
    51, 94,    0,     55, 319,   0,     59, 200,   0,      1,  0,     0,     59, 0,     0,     1,  0,     0,
    59, 0,     0,     1,  0,     0,     9,  -250,  0,      14, 132,   984,   16, 161,   0,     17, -25,   -2172,
    18, -54,   0,     19, 75,    7231,  20, 374,   0,      26, 71,    -1755, 31, -38,   298,   34, -22,   -321,
    37, -280,  0,     40, -223,  0,     42, -296,  0,      43, -286,  763,   49, 45,    2349,  51, 171,   0,
    55, -218,  0,     59, -100,  0,     1,  140,   0,      9,  240,   466,   14, 292,   0,     16, 168,   -3013,
    17, 61,    -2855, 18, -46,   -3477, 19, -146,  0,      20, -104,  359,   26, -21,   579,   31, 105,   1047,
    34, 241,   240,   37, 245,   0,     40, 213,   -754,   42, 62,    -3345, 43, -38,   -1794, 45, -51,   1120,
    49, 201,   1966,  51, 326,   0,     55, 194,   -1416,  59, 5,     0,     1,  0,     0,     9,  0,     0,
    18, 0,     0,     27, 0,     0,     35, 0,     0,      47, 0,     0,     59, 0,     0,     1,  60,    0,
    9,  60,    0,     18, 60,    0,     27, 60,    0,      35, 60,    0,     47, 60,    0,     59, 60,    0,
    1,  0,     0,     9,  -250,  -973,  18, -350,  495,    29, 100,   0,     37, -250,  -1020, 47, -350,  139,
    53, -250,  977,   59, 0,     0,     1,  0,     0,      59, 0,     0,     1,  82,    0,     59, 82,    0,
    1,  0,     0,     20, -350,  0,     31, 200,   0,      39, -250,  -1209, 49, -400,  159,   55, -250,  1508,
    59, 0,     0,     1,  -150,  0,     11, -200,  0,      15, -165,  330,   25, -50,   355,   33, -35,   -143,
    39, -125,  -731,  41, -175,  -810,  43, -200,  0,      59, 0,     0,     1,  0,     0,     6,  56,    441,
    11, 125,   0,     15, 81,    -591,  20, -35,   -626,   25, -77,   0,     33, -13,   321,   39, 33,    0,
    43, 8,     -41,   59, 0,     0,     1,  0,     0,      6,  0,     0,     11, -59,   -424,  15, -128,  -337,
    20, -130,  302,   25, -63,   420,   33, 0,     -19,    39, -35,   -144,  43, -45,   0,     59, 0,     0,
    1,  0,     0,     15, 100,   0,     30, -150,  0,      40, 0,     0,     59, 0,     0,     1,  60,    885,
    15, 450,   0,     30, 50,    0,     40, 450,   0,      59, 58,    0,     1,  -410,  444,   15, -200,  0,
    30, -550,  0,     40, -300,  0,     59, -564,  0,      1,  0,     0,     59, 0,     0,     1,  -55,   0,
    15, -550,  -815,  30, -700,  0,     48, -400,  1231,   59, -55,   0,     1,  0,     0,     59, 0,     0,
    1,  -200,  881,   10, 50,    686,   19, 150,   0,      28, 150,   0,     44, 250,   0,     59, 0,     0,
    1,  -900,  0,     10, -850,  601,   19, -300,  976,    28, -250,  -357,  32, -350,  -1451, 36, -700,  0,
    44, -650,  497,   59, 58,    0,     1,  750,   0,      10, 200,   0,     19, 450,   0,     28, 0,     -731,
    44, -150,  0,     59, 564,   0,     1,  0,     0,      59, 0,     0,     1,  -350,  769,   10, -150,  500,
    24, -100,  -379,  32, -400,  0,     40, -100,  0,      50, -300,  0,     59, -60,   0,     1,  0,     0,
    59, 0,     0,     1,  0,     0,     59, 0,     0,      1,  0,     0,     59, 0,     0,     1,  0,     0,
    59, 0,     0,     1,  100,   0,     6,  50,    -738,   11, -150,  0,     17, -157,  -248,  25, -200,  -116,
    44, -150,  368,   51, -100,  376,   59, 0,     0,      1,  0,     0,     59, 0,     0,     1,  0,     0,
    59, 0,     0,     1,  0,     0,     59, 0,     0,      1,  0,     0,     59, 0,     0,     1,  0,     0,
    59, 0,     0
};

aNPC_Animation_c cKF_ba_r_npc_1_go_out1 = {
    { cKF_ckcb_r_npc_1_go_out1_tbl, cKF_ds_npc_1_go_out1_tbl, cKF_kn_npc_1_go_out1_tbl, cKF_c_npc_1_go_out1_tbl, -1,
      59 },
    1.0f,
    59.0f,
    cKF_FRAMECONTROL_STOP,
    0.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
