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

s16 cKF_kn_npc_1_tkykyoro1_tbl[] = { 9, 11, 11, 9, 9,  9, 8,  11, 7,  8, 10, 8, 6,  11, 6,  10, 13, 11,
                                     8, 9,  8,  8, 11, 8, 11, 11, 11, 2, 2,  2, 11, 9,  9,  9,  9,  9,
                                     4, 7,  4,  9, 9,  9, 8,  8,  8,  2, 2,  2, 9,  11, 11, 4 };

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

s16 cKF_ds_npc_1_tkykyoro1_tbl[] = {
    1,   0,    8,     21,  -798,  -2,   47,  -798,  6,    52,  0,     390,  63,  0,     3,    77,  790,   3,
    109, 790,  2,     114, 0,     -381, 125, 0,     0,    1,   996,   0,    21,  942,   0,    24,  942,   0,
    47,  942,  0,     53,  992,   38,   63,  996,   0,    77,  942,   0,    86,  942,   0,    109, 942,   0,
    115, 992,  38,    125, 996,   0,    1,   0,     0,    21,  736,   0,    24,  736,   0,    47,  736,   0,
    52,  166,  -1220, 63,  0,     0,    77,  736,   0,    86,  736,   0,    109, 736,   0,    114, 166,   -1378,
    125, 0,    0,     1,   0,     0,    24,  -206,  0,    47,  -206,  0,    54,  -50,   495,  63,  0,     0,
    86,  206,  0,     109, 206,   0,    116, 50,    -424, 125, 0,     0,    1,   0,     0,    24,  -352,  0,
    47,  -352, 0,     54,  -100,  1104, 63,  0,     0,    86,  -352,  0,    109, -352,  0,    116, -100,  1104,
    125, 0,    0,     1,   0,     0,    24,  289,   1,    47,  289,   -1,   54,  70,    -569, 63,  0,     4,
    86,  -285, 1,     109, -285,  1,    116, -70,   739,  125, 0,     0,    1,   -175,  -7,   28,  112,   0,
    47,  112,  0,     53,  -110,  -613, 61,  -175,  6,    86,  -212,  -2,   110, -212,  6,    125, -175,  0,
    1,   -100, 2,     5,   -490,  -216, 21,  -470,  0,    47,  -470,  -1,   51,  -630,  10,   54,  -170,  796,
    61,  -100, 9,     75,  64,    450,  86,  63,    3,    110, 63,    -7,   125, -100,  0,    1,   25,    -1,
    28,  27,   -2,    47,  27,    2,    61,  25,    -237, 86,  -281,  -7,   110, -281,  3,    125, 25,    0,
    1,   0,    0,     6,   -13,   -122, 24,  -93,   0,    48,  -93,   0,    63,  0,     296,  86,  95,    1,
    110, 95,   -1,    125, 0,     0,    1,   200,   -4,   6,   438,   3,    24,  0,     2,    48,  0,     -2,
    54,  160,  394,   63,  200,   18,   75,  500,   7,    86,  324,   0,    110, 324,   0,    125, 200,   0,
    1,   0,    -29,   6,   -36,   -412, 24,  -155,  1,    48,  -155,  1,    63,  0,     337,  86,  -42,   0,
    110, -43,  0,     125, 0,     0,    28,  0,     0,    48,  0,     0,    63,  0,     0,    90,  -146,  0,
    110, -146, 0,     125, 0,     0,    1,   -100,  0,    4,   100,   4,    11,  -240,  14,   28,  65,    0,
    48,  65,   0,     51,  -80,   -11,  58,  -50,   -19,  63,  -100,  -7,   90,  -227,  0,    110, -227,  0,
    125, -100, 0,     28,  0,     0,    48,  0,     0,    63,  0,     0,    90,  170,   0,    110, 170,   0,
    125, 0,    0,     1,   175,   -1,   24,  190,   0,    45,  190,   3,    52,  178,   -25,  63,  175,   5,
    86,  -303, -8,    93,  -305,  0,    109, -303,  -4,   117, 140,   328,  125, 175,   0,    1,   -100,  -1,
    24,  97,   5,     33,  96,    0,    45,  97,    3,    51,  -188,  336,  63,  -100,  -6,   68,  -560,  -473,
    86,  -502, -3,    93,  -503,  0,    110, -502,  6,    112, -750,  -5,   116, -270,  1500, 125, -100,  0,
    1,   -25,  1,     24,  256,   1,    33,  255,   0,    45,  256,   -1,   52,  -108,  352,  63,  -25,   -9,
    86,  186,  17,    93,  186,   -2,   109, 184,   -2,   117, -50,   272,  125, -25,   0,    1,   0,     0,
    24,  83,   2,     45,  83,    -2,   51,  20,    -160, 63,  0,     -2,   86,  149,   -4,   107, 149,   -7,
    125, 0,    0,     1,   200,   4,    24,  220,   2,    45,  220,   2,    52,  204,   -33,  63,  200,   3,
    69,  525,  3,     86,  41,    -2,   107, 41,    -1,   125, 200,   0,    1,   0,     0,    24,  155,   0,
    45,  155,  0,     52,  40,    -319, 63,  0,     4,    86,  39,    -8,   107, 39,    0,    125, 0,     0,
    1,   0,    0,     24,  -133,  0,    45,  -133,  0,    63,  0,     -26,  86,  17,    1,    91,  17,    0,
    107, 17,   -1,    125, 0,     0,    1,   -100,  4,    24,  -312,  -3,   45,  -312,  0,    63,  -100,  0,
    67,  170,  -5,    71,  -250,  0,    80,  -65,   736,  86,  56,    -4,   91,  56,    0,    107, 56,    1,
    125, -100, 0,     1,   0,     0,    24,  -175,  0,    45,  -175,  0,    63,  0,     31,   86,  34,    -1,
    91,  34,   0,     107, 34,    1,    125, 0,     0,    1,   0,     0,    17,  0,     0,    40,  0,     0,
    51,  0,    0,     57,  0,     0,    63,  0,     0,    79,  0,     0,    102, 0,     0,    113, 0,     0,
    119, 0,    0,     125, 0,     0,    1,   60,    -6,   17,  226,   -12,  40,  44,    0,    51,  280,   0,
    57,  66,   -203,  63,  60,    218,  79,  226,   -12,  102, 44,    0,    113, 280,   0,    119, 66,    -203,
    125, 60,   0,     1,   0,     0,    17,  0,     0,    40,  0,     0,    51,  0,     0,    57,  0,     0,
    63,  0,    0,     79,  0,     0,    102, 0,     0,    113, 0,     0,    119, 0,     0,    125, 0,     0,
    1,   0,    0,     125, 0,     0,    1,   0,     0,    125, 0,     0,    1,   0,     0,    125, 0,     0,
    1,   0,    0,     20,  120,   170,  24,  130,   37,   47,  130,   -25,  54,  40,    -260, 62,  0,     2,
    78,  -100, -222,  84,  -130,  -10,  110, -130,  24,   116, -40,   260,  125, 0,     0,    1,   2,     0,
    24,  33,   0,     47,  33,    0,    55,  10,    -68,  63,  2,     0,    86,  33,    0,    109, 33,    0,
    117, 10,   -71,   125, 2,     0,    1,   0,     1,    24,  113,   15,   47,  113,   -14,  54,  50,    -328,
    63,  0,    0,     86,  -113,  -20,  109, -113,  11,   116, -50,   307,  125, 0,     0,    1,   0,     0,
    12,  -18,  0,     33,  -18,   0,    47,  -18,   0,    63,  0,     0,    74,  -18,   0,    95,  -18,   0,
    109, -18,  0,     125, 0,     0,    1,   58,    0,    12,  -1079, 0,    33,  -1079, 0,    47,  -1079, 0,
    63,  58,   0,     71,  -641,  0,    95,  -641,  0,    109, -641,  0,    125, 58,    0,    1,   -564,  0,
    12,  -446, 0,     33,  -446,  0,    47,  -446,  0,    63,  -564,  0,    74,  -446,  0,    95,  -446,  0,
    109, -446, 0,     125, -564,  0,    55,  0,     0,    63,  0,     0,    117, 0,     0,    125, 0,     0,
    1,   -57,  468,   40,  -180,  0,    55,  -306,  0,    63,  -57,   0,    102, -180,  0,    117, -306,  0,
    125, -57,  0,     55,  0,     0,    63,  0,     0,    117, 0,     0,    125, 0,     0,    1,   0,     -2,
    9,   596,  -20,   33,  596,   0,    47,  596,   19,   63,  0,     0,    71,  596,   5,    95,  596,   0,
    109, 596,  -30,   125, 0,     0,    1,   58,    0,    9,   -643,  0,    33,  -643,  0,    47,  -643,  0,
    63,  58,   0,     74,  -1076, 0,    95,  -1076, 0,    109, -1076, 0,    125, 58,    0,    1,   564,   0,
    9,   -91,  0,     33,  -91,   0,    47,  -91,   0,    63,  564,   0,    71,  -91,   0,    95,  -91,   0,
    109, -91,  0,     125, 564,   0,    1,   0,     -66,  7,   -84,   -64,  40,  -84,   -1,   47,  -85,   0,
    69,  -84,  0,     102, -84,   -1,   109, -85,   109,  125, 0,     0,    1,   -57,   0,    7,   -160,  0,
    40,  -160, 0,     47,  -160,  0,    69,  -160,  0,    102, -160,  0,    109, -160,  0,    125, -57,   0,
    1,   0,    222,   7,   281,   216,  40,  281,   2,    47,  284,   0,    69,  281,   -2,   102, 281,   2,
    109, 284,  -367,  125, 0,     0,    1,   0,     0,    125, 0,     0,    1,   0,     0,    125, 0,     0,
    1,   0,    0,     125, 0,     0,    1,   0,     -1,   33,  -31,   -4,   44,  -31,   1,    52,  -17,   105,
    63,  0,    -7,    95,  32,    0,    106, 32,    1,    114, 16,    -117, 125, 0,     0,    1,   0,     0,
    12,  45,   180,   33,  95,    -2,   44,  95,    -7,   52,  60,    -266, 63,  0,     -21,  74,  45,    169,
    95,  95,   -2,    106, 95,    -7,   114, 60,    -287, 125, 0,     0,    1,   0,     0,    12,  26,    198,
    33,  162,  -3,    44,  162,   1,    52,  51,    -270, 63,  0,     -4,   74,  -26,   -150, 95,  -165,  -3,
    106, -165, 1,     114, -42,   289,  125, 0,     0,    1,   0,     0,    48,  0,     0,    110, 0,     0,
    125, 0,    0
};

u8 npc_1_tkykyoro11_tex_index[] = { 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
                                    4, 4, 4, 4, 4, 4, 4, 4, 1, 2, 1, 4, 4, 1, 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
                                    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
                                    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 2, 1, 4, 4,
                                    1, 2, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 };

aNPC_Animation_c cKF_ba_r_npc_1_tkykyoro1 = {
    { cKF_ckcb_r_npc_1_tkykyoro1_tbl, cKF_ds_npc_1_tkykyoro1_tbl, cKF_kn_npc_1_tkykyoro1_tbl, cKF_c_npc_1_tkykyoro1_tbl,
      -1, 125 },
    1.0f,
    125.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    npc_1_tkykyoro11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
