#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_niko_i1_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_niko_i1_tbl[] = { 2, 5, 5, 2, 3, 2, 5, 5, 5, 2, 4, 2, 2, 5, 5, 5, 9, 5, 2, 5, 2, 2, 5, 5, 2, 5, 2,
                                   2, 6, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 4, 2, 2, 2 };

s16 cKF_c_npc_1_niko_i1_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_niko_i1_tbl[] = {
    1,  0,    0,    33, 0,    0,   1,  975,  0,   9,  1025, 0,    17, 975,  0,    25, 1025, 0,    33, 975,  0,
    1,  0,    0,    9,  60,   0,   17, 40,   0,   25, 60,   0,    33, 0,    0,    1,  0,    0,    33, 0,    0,
    1,  60,   0,    17, 20,   0,   33, 60,   0,   1,  90,   0,    33, 90,   0,    1,  -185, 0,    9,  -186, 0,
    17, -183, 0,    25, -186, 0,   33, -185, 0,   1,  40,   0,    9,  70,   0,    17, 43,   0,    25, 70,   0,
    33, 40,   0,    1,  -85,  0,   9,  -91,  -15, 17, -93,  0,    25, -91,  15,   33, -85,  0,    1,  0,    0,
    33, 0,    0,    1,  40,   0,   9,  0,    0,   25, 0,    0,    33, 40,   0,    1,  0,    0,    33, 0,    0,
    1,  0,    0,    33, 0,    0,   1,  -15,  0,   9,  19,   0,    17, -18,  0,    25, 19,   0,    33, -15,  0,
    1,  0,    0,    9,  8,    0,   17, -1,   0,   25, 8,    0,    33, 0,    0,    1,  180,  0,    9,  166,  0,
    17, 191,  0,    25, 166,  0,   33, 180,  0,   1,  -260, 0,    5,  -208, 529,  9,  -163, 0,    13, -224, -531,
    17, -278, 0,    21, -224, 521, 25, -163, 0,   29, -206, -541, 33, -260, 0,    1,  -145, 0,    9,  -120, 0,
    17, -151, 0,    25, -120, 0,   33, -145, 0,   1,  0,    0,    33, 0,    0,    1,  560,  0,    9,  404,  0,
    17, 579,  0,    25, 404,  0,   33, 560,  0,   1,  0,    0,    33, 0,    0,    1,  0,    0,    33, 0,    0,
    1,  -240, 0,    9,  -206, 0,   17, -276, 0,   25, -206, 0,    33, -240, 0,    1,  -40,  0,    9,  -33,  0,
    17, -40,  0,    25, -33,  0,   33, -40,  0,   1,  0,    0,    33, 0,    0,    1,  60,   0,    9,  -60,  0,
    17, 60,   0,    25, -60,  0,   33, 60,   0,   1,  0,    0,    33, 0,    0,    1,  0,    0,    33, 0,    0,
    1,  82,   1384, 4,  170,  0,   11, -170, 0,   19, 170,  0,    27, -170, 0,    33, 83,   1344, 1,  0,    0,
    33, 0,    0,    1,  0,    0,   33, 0,    0,   1,  100,  -78,  2,  98,   0,    18, 198,  0,    33, 100,  -78,
    1,  -90,  0,    33, -90,  0,   1,  0,    0,   33, 0,    0,    1,  -300, 0,    33, -300, 0,    1,  -500, 0,
    33, -500, 0,    1,  0,    0,   33, 0,    0,   1,  -600, 0,    33, -600, 0,    1,  0,    0,    33, 0,    0,
    1,  0,    0,    33, 0,    0,   1,  -300, 0,   33, -300, 0,    1,  503,  0,    33, 503,  0,    1,  0,    0,
    33, 0,    0,    1,  -600, 0,   33, -600, 0,   1,  0,    0,    33, 0,    0,    1,  0,    0,    33, 0,    0,
    1,  0,    0,    33, 0,    0,   1,  0,    0,   33, 0,    0,    1,  0,    0,    33, 0,    0,    1,  -200, 0,
    9,  -150, 0,    17, -200, 0,   25, -150, 0,   33, -200, 0,    1,  -10,  -149, 9,  -50,  0,    25, 50,   0,
    33, 0,    -273, 1,  0,    0,   33, 0,    0,   1,  0,    0,    33, 0,    0,    1,  0,    0,    33, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_niko_i1 = {
    { cKF_ckcb_r_npc_1_niko_i1_tbl, cKF_ds_npc_1_niko_i1_tbl, cKF_kn_npc_1_niko_i1_tbl, cKF_c_npc_1_niko_i1_tbl, -1,
      33 },
    1.0f,
    33.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
