#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_gyafun1_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_gyafun1_tbl[] = { 3, 7, 6, 3, 5, 3, 9, 9, 9, 3, 9, 3, 3, 9, 9, 9, 9, 9, 3, 9, 9, 3,  9,  9, 4, 5, 4,
                                   3, 5, 3, 5, 6, 8, 6, 6, 6, 3, 6, 3, 6, 6, 6, 3, 6, 3, 3, 3, 3, 14, 13, 6, 3, 3, 3 };

s16 cKF_c_npc_1_gyafun1_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_gyafun1_tbl[] = {
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  1000, 0,     3,  1100, 0,     5,  528,  0,
    6,  628,  0,     23, 628,  0,     48, 1000, 0,     56, 1000, 0,     1,  0,    0,     3,  -200, 0,
    5,  -150, 492,   19, -100, 0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  0,    1503,  5,  200,  0,     23, 200,  0,     48, 0,    0,     56, 0,    0,
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  -175, 0,     3,  -166, 0,     4,  -205, -2940,
    5,  -305, 0,     6,  -235, 0,     23, -225, 112,   38, -198, 167,   48, -175, 0,     56, -175, 0,
    1,  -100, 0,     3,  25,   0,     4,  -205, -8347, 5,  -376, 0,     6,  -270, 0,     23, -251, 118,
    38, -204, 407,   48, -100, 0,     56, -100, 0,     1,  25,   0,     3,  -5,   0,     4,  80,   4941,
    5,  205,  0,     6,  133,  0,     23, 130,  -56,   38, 84,   -441,  48, 25,   0,     56, 25,   0,
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  200,  0,     3,  0,    0,     4,  533,  24342,
    5,  975,  0,     6,  789,  0,     23, 808,  0,     38, 585,  -2008, 48, 200,  0,     56, 200,  0,
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,     56, 0,    0,
    1,  -100, 0,     3,  -100, 0,     4,  -145, -4389, 5,  -370, 0,     6,  -311, 0,     23, -345, 0,
    38, -278, 741,   48, -100, 0,     56, -100, 0,     1,  0,    0,     3,  -25,  0,     4,  56,   2298,
    5,  85,   0,     6,  60,   0,     23, 50,   -74,   38, 25,   -180,  48, 0,    0,     56, 0,    0,
    1,  175,  0,     3,  166,  0,     4,  205,  2041,  5,  305,  0,     6,  235,  0,     23, 225,  -112,
    38, 198,  -163,  48, 175,  0,     56, 175,  0,     1,  -100, 0,     3,  25,   0,     4,  -205, -9618,
    5,  -376, 0,     6,  -270, 0,     23, -251, 118,   38, -204, 407,   48, -100, 0,     56, -100, 0,
    1,  -25,  0,     3,  5,    0,     4,  -80,  -4332, 5,  -205, 0,     6,  -133, 0,     23, -130, 58,
    38, -84,  441,   48, -25,  0,     56, -25,  0,     1,  0,    0,     48, 0,    0,     56, 0,    0,
    1,  200,  0,     3,  0,    0,     4,  533,  25814, 5,  975,  0,     6,  789,  0,     23, 808,  0,
    38, 585,  -2008, 48, 200,  0,     56, 200,  0,     1,  0,    0,     3,  0,    0,     4,  0,    0,
    5,  0,    0,     6,  0,    0,     23, 0,    0,     38, 0,    0,     48, 0,    0,     56, 0,    0,
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  -100, 0,     3,  -100, 0,     4,  -145, -3293,
    5,  -370, 0,     6,  -311, 0,     23, -345, 0,     38, -278, 741,   48, -100, 0,     56, -100, 0,
    1,  0,    0,     3,  25,   0,     4,  -56,  -1671, 5,  -85,  0,     6,  -60,  0,     23, -50,  72,
    38, -25,  179,   48, 0,    0,     56, 0,    0,     1,  0,    0,     6,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  60,   0,     5,  -90,  -2108, 7,  -355, 110,   46, 60,   193,   56, 60,   0,
    1,  0,    0,     6,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  82,   0,     6,  50,   -590,  10, -95,  23,    46, 80,   144,   56, 82,   0,
    1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     3,  0,    0,     5,  0,    0,
    48, 0,    0,     56, 0,    0,     1,  2,    0,     3,  -25,  -1129, 5,  -369, 0,     23, -229, 0,
    48, 2,    0,     56, 2,    0,     1,  0,    807,   3,  0,    -815,  5,  0,    0,     23, 5,    77,
    28, 15,   0,     42, -15,  0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     4,  245,  3056,
    6,  375,  0,     23, 250,  0,     48, 0,    0,     56, 0,    0,     1,  58,   0,     3,  0,    0,
    4,  240,  0,     23, 200,  0,     48, 58,   0,     56, 58,   0,     1,  -414, 0,     3,  -450, 0,
    4,  -200, 2509,  23, -100, 0,     48, -414, 0,     56, -414, 0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  -57,  0,     3,  -150, -3776, 5,  -700, -2090, 23, -750, 0,     48, -57,  0,
    56, -57,  0,     1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     4,  -245, -3061,
    6,  -375, 0,     23, -250, 0,     48, 0,    0,     56, 0,    0,     1,  58,   0,     3,  0,    0,
    4,  240,  0,     23, 200,  0,     48, 58,   0,     56, 58,   0,     1,  414,  0,     3,  450,  0,
    4,  200,  -2495, 23, 100,  0,     48, 414,  0,     56, 414,  0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  -57,  0,     3,  -150, -3785, 5,  -700, -2107, 23, -750, 0,     48, -57,  0,
    56, -57,  0,     1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  0,    0,     7,  0,    0,     13, -38,  -731,  16, -272, -5143, 18, -424, -568,
    22, -457, 7,     26, -429, 303,   29, -70,  10057, 33, 390,  346,   38, 411,  0,     43, 360,  -808,
    45, 230,  -2997, 47, 103,  -802,  56, 0,    4,     1,  0,    0,     5,  -84,  -2318, 6,  -262, 0,
    7,  -216, 516,   13, -185, 391,   23, 13,   14,    31, 20,   91,    36, 90,   390,   41, 108,  -3,
    44, 95,   -332,  46, 31,   -1244, 48, -16,  -16,   56, 0,    0,     1,  0,    0,     23, 0,    0,
    33, 20,   0,     43, -20,  0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0,     1,  0,    0,     48, 0,    0,     56, 0,    0,     1,  0,    0,     48, 0,    0,
    56, 0,    0
};

u8 npc_1_gyafun10_tex_index[] = {
    0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
};

u8 npc_1_gyafun11_tex_index[] = {
    0, 0, 1, 2, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 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, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0
};

aNPC_Animation_c cKF_ba_r_npc_1_gyafun1 = {
    { cKF_ckcb_r_npc_1_gyafun1_tbl, cKF_ds_npc_1_gyafun1_tbl, cKF_kn_npc_1_gyafun1_tbl, cKF_c_npc_1_gyafun1_tbl, -1,
      56 },
    1.0f,
    56.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_gyafun11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_gyafun10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
