#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_estimate_f1_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_estimate_f1_tbl[] = { 2, 2, 2, 10, 8,  8,  10, 8,  10, 2, 9,  2, 2,  10, 7,  10, 10, 10,
                                       2, 8, 2, 2,  10, 5,  2,  16, 13, 2, 17, 2, 14, 16, 12, 10, 6,  10,
                                       2, 4, 2, 13, 13, 13, 2,  13, 2,  2, 2,  2, 11, 13, 9,  2,  2,  2 };

s16 cKF_c_npc_1_estimate_f1_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_estimate_f1_tbl[] = {
    1,  0,    0,    81, 0,    0, 1,  975,  0,    81, 975,  0,    1,  0,    0,   81, 0,    0,   1,  0,    0,
    10, -20,  0,    19, -20,  0, 25, 0,    0,    34, 0,    0,    40, 30,   0,   49, 30,   0,   55, 15,   0,
    64, 15,   0,    81, 0,    0, 1,  60,   0,    10, 80,   0,    19, 80,   0,   25, 60,   0,   49, 60,   0,
    55, 80,   0,    64, 80,   0, 81, 60,   0,    1,  90,   0,    19, 90,   0,   25, 50,   0,   34, 50,   0,
    40, 60,   0,    49, 60,   0, 55, 90,   0,    81, 90,   0,    1,  -185, 0,   10, -208, 0,   19, -208, 0,
    25, -180, 0,    34, -180, 0, 40, -153, 0,    49, -153, 0,    55, -173, 0,   64, -173, 0,   81, -185, 0,
    1,  40,   0,    10, 63,   0, 19, 63,   0,    25, -45,  0,    49, -45,  0,   55, 35,   0,   64, 35,   0,
    81, 40,   0,    1,  -85,  0, 10, -88,  0,    19, -88,  0,    25, -18,  0,   34, -18,  0,   40, -33,  0,
    49, -33,  0,    55, -77,  0, 64, -77,  0,    81, -85,  0,    1,  0,    0,   81, 0,    0,   1,  40,   0,
    19, 40,   0,    25, 233,  0, 34, 233,  0,    40, 215,  0,    49, 215,  0,   55, 90,   0,   64, 90,   0,
    81, 40,   0,    1,  0,    0, 81, 0,    0,    1,  0,    0,    81, 0,    0,   1,  -15,  0,   10, -20,  0,
    19, -20,  0,    25, -118, 0, 34, -118, 0,    40, -100, 0,    49, -100, 0,   55, -35,  0,   64, -35,  0,
    81, -15,  0,    1,  0,    0, 34, 0,    0,    40, 8,    0,    49, 8,    0,   55, 5,    0,   64, 5,    0,
    81, 0,    0,    1,  180,  0, 10, 158,  0,    19, 158,  0,    25, 180,  0,   34, 180,  0,   40, 210,  0,
    49, 210,  0,    55, 190,  0, 64, 190,  0,    81, 180,  0,    1,  -260, 0,   10, -253, 0,   19, -253, 0,
    25, -235, 0,    34, -235, 0, 40, -225, 0,    49, -225, 0,    55, -233, 0,   64, -233, 0,   81, -260, 0,
    1,  -145, 0,    10, -135, 0, 19, -135, 0,    25, -98,  0,    34, -98,  0,   40, -120, 0,   49, -120, 0,
    55, -148, 0,    64, -148, 0, 81, -145, 0,    1,  0,    0,    81, 0,    0,   1,  560,  0,   19, 560,  0,
    25, 508,  0,    34, 508,  0, 40, 520,  0,    49, 520,  0,    55, 560,  0,   81, 560,  0,   1,  0,    0,
    81, 0,    0,    1,  0,    0, 81, 0,    0,    1,  -240, 0,    10, -233, 0,   19, -233, 0,   25, -213, 0,
    34, -213, 0,    40, -230, 0, 49, -230, 0,    55, -245, 0,    64, -245, 0,   81, -240, 0,   1,  -40,  0,
    10, -45,  0,    19, -45,  0, 25, -40,  0,    81, -40,  0,    1,  0,    0,   81, 0,    0,   1,  60,   0,
    10, -250, 0,    18, -250, 0, 24, -400, 0,    26, -350, 0,    33, -350, 0,   39, 0,    0,   41, -50,  0,
    48, -50,  0,    54, 100,  0, 56, 60,   0,    63, 60,   0,    67, -25,  0,   71, 30,   0,   75, -25,  0,
    81, 60,   0,    1,  0,    0, 10, 50,   0,    18, 50,   0,    24, 125,  0,   26, 100,  0,   33, 100,  0,
    39, -25,  0,    41, 0,    0, 48, 0,    0,    54, -75,  0,    56, -50,  0,   63, -50,  0,   81, 0,    0,
    1,  0,    0,    81, 0,    0, 1,  82,   0,    11, -80,  0,    13, 0,    0,   19, 0,    0,   25, -80,  0,
    27, 0,    0,    34, 0,    0, 40, 80,   0,    42, 0,    0,    49, 0,    0,   55, 80,   0,   57, 0,    0,
    64, 0,    0,    68, 0,    0, 72, 50,   0,    76, 0,    0,    81, 82,   0,   1,  0,    0,   81, 0,    0,
    1,  0,    0,    10, -80,  0, 19, -80,  0,    25, -5,   380,  27, -25,  0,   34, -25,  0,   40, -120, -479,
    42, -100, 0,    49, -100, 0, 55, 45,   742,  57, 25,   0,    64, 25,   0,   72, 5,    -50, 81, 0,    0,
    1,  100,  0,    10, 120,  0, 19, 120,  0,    25, 80,   -200, 27, 100,  0,   34, 100,  0,   40, 140,  206,
    42, 120,  0,    49, 120,  0, 55, 30,   -457, 57, 50,   0,    64, 50,   0,   68, 35,   0,   72, 75,   0,
    76, 60,   0,    81, 100,  0, 1,  -50,  0,    19, -50,  0,    25, 20,   358, 27, 0,    0,   34, 0,    0,
    40, -120, -607, 42, -100, 0, 49, -100, 0,    55, 20,   613,  57, 0,    0,   64, 0,    0,   81, -50,  0,
    1,  -120, 0,    10, -500, 0, 19, -500, 0,    25, -625, 0,    34, -625, 0,   40, 50,   0,   49, 50,   0,
    55, -625, 0,    65, -625, 0, 81, -120, 0,    1,  -700, 0,    10, -500, 0,   19, -500, 0,   25, -450, 0,
    65, -450, 0,    81, -700, 0, 1,  -450, 0,    10, 150,  0,    19, 150,  0,   25, 325,  0,   34, 325,  0,
    40, -150, 0,    49, -150, 0, 55, 325,  0,    65, 325,  0,    81, -450, 0,   1,  0,    0,   81, 0,    0,
    1,  -50,  0,    10, 0,    0, 64, 0,    0,    81, -50,  0,    1,  0,    0,   81, 0,    0,   1,  0,    0,
    10, -150, 0,    19, -150, 0, 25, 75,   0,    27, 50,   0,    34, 50,   0,   40, -25,  0,   42, 0,    0,
    49, 0,    0,    55, -125, 0, 57, -100, 0,    64, -100, 0,    81, 0,    0,   1,  50,   0,   10, -50,  0,
    19, -50,  0,    25, 225,  0, 27, 200,  0,    34, 200,  0,    40, 25,   0,   42, 50,   0,   49, 50,   0,
    55, 275,  0,    57, 250,  0, 64, 250,  0,    81, 50,   0,    1,  300,  0,   10, 400,  0,   19, 400,  0,
    25, 225,  0,    27, 250,  0, 34, 250,  0,    40, 325,  0,    42, 300,  0,   49, 300,  0,   55, 225,  0,
    57, 250,  0,    64, 250,  0, 81, 300,  0,    1,  0,    0,    81, 0,    0,   1,  -57,  0,   10, -300, 0,
    19, -300, 0,    25, 25,   0, 27, 0,    0,    34, 0,    0,    40, -375, 0,   42, -350, 0,   49, -350, 0,
    55, 25,   0,    57, 0,    0, 64, 0,    0,    81, -57,  0,    1,  0,    0,   81, 0,    0,   1,  0,    0,
    81, 0,    0,    1,  0,    0, 81, 0,    0,    1,  0,    0,    81, 0,    0,   1,  0,    0,   10, 355,  0,
    19, 355,  0,    25, 405,  0, 34, 405,  0,    40, 455,  0,    49, 455,  0,   55, 405,  0,   65, 405,  0,
    73, 100,  -840, 81, 0,    0, 1,  -200, 0,    10, -350, 0,    19, -350, 0,   25, -450, 0,   34, -450, 0,
    40, -350, 0,    49, -350, 0, 55, -200, 0,    65, -200, 0,    69, -270, 0,   73, -200, 0,   77, -270, 0,
    81, -200, 0,    1,  -10,  0, 19, -10,  0,    25, 150,  0,    34, 150,  0,   40, -200, 0,   49, -200, 0,
    55, 50,   0,    65, 50,   0, 81, -10,  0,    1,  0,    0,    81, 0,    0,   1,  0,    0,   81, 0,    0,
    1,  0,    0,    81, 0,    0
};

u8 npc_1_estimate_f11_tex_index[] = { 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,
                                      3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
                                      3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

aNPC_Animation_c cKF_ba_r_npc_1_estimate_f1 = {
    { cKF_ckcb_r_npc_1_estimate_f1_tbl, cKF_ds_npc_1_estimate_f1_tbl, cKF_kn_npc_1_estimate_f1_tbl,
      cKF_c_npc_1_estimate_f1_tbl, -1, 81 },
    1.0f,
    81.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_estimate_f11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
