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

s16 cKF_c_npc_1_contract2_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 };

s16 cKF_ds_npc_1_contract2_tbl[] = {
    1,  0,    0, 18, 0,    0,     1,  1200, 0,    8,  1150, -909, 14, 950,  0,    18, 950,  0,     1,  500,  0,
    14, 50,   0, 18, 50,   0,     1,  -50,  0,    3,  -50,  0,    14, 0,    0,    18, 0,    0,     1,  -200, 0,
    3,  -200, 0, 14, 60,   0,     18, 60,   0,    1,  25,   0,    3,  25,   0,    14, 100,  0,     18, 100,  0,
    1,  -200, 0, 3,  -200, 0,     7,  -175, 0,    14, -198, 0,    18, -198, 0,    1,  -193, 0,     7,  -230, 0,
    14, 90,   0, 18, 90,   0,     1,  5,    -59,  7,  -15,  -152, 14, -53,  0,    18, -53,  0,     1,  0,    0,
    18, 0,    0, 1,  0,    0,     7,  0,    0,    14, 30,   0,    18, 30,   0,    1,  0,    0,     18, 0,    0,
    1,  0,    0, 18, 0,    0,     1,  185,  0,    3,  185,  0,    7,  300,  0,    14, -38,  0,     18, -38,  0,
    1,  40,   0, 7,  70,   0,     14, -55,  0,    18, -55,  0,    1,  145,  0,    7,  138,  98,    10, 168,  0,
    14, 163,  0, 18, 163,  0,     1,  8,    0,    4,  5,    0,    7,  38,   0,    14, -188, 0,     18, -188, 0,
    1,  -20,  0, 4,  -33,  0,     7,  -45,  -350, 14, -183, 0,    18, -183, 0,    1,  0,    0,     18, 0,    0,
    1,  77,   0, 7,  0,    0,     10, 325,  3985, 14, 620,  0,    18, 620,  0,    1,  0,    0,     18, 0,    0,
    1,  0,    0, 18, 0,    0,     1,  -103, -96,  4,  20,   0,    7,  10,   -308, 10, -220, -2380, 14, -360, 0,
    18, -360, 0, 1,  5,    56,    4,  -5,   0,    7,  0,    47,   10, 5,    73,   14, 15,   0,     18, 15,   0,
    1,  0,    0, 18, 0,    0,     1,  60,   0,    18, 60,   0,    1,  0,    0,    18, 0,    0,     1,  0,    0,
    18, 0,    0, 1,  376,  0,     18, 102,  0,    1,  0,    0,    18, 0,    0,    1,  -150, 0,     14, 300,  440,
    18, 330,  0, 1,  200,  0,     5,  200,  0,    14, 100,  -182, 18, 88,   0,    1,  0,    0,     5,  0,    0,
    18, -50,  0, 1,  -550, 0,     5,  -700, 0,    14, -100, 0,    18, -100, 0,    1,  -700, 0,     5,  -600, 1508,
    14, 25,   0, 18, 25,   0,     1,  175,  0,    5,  300,  0,    12, -250, 0,    14, -200, 0,     18, -200, 0,
    1,  0,    0, 18, 0,    0,     1,  0,    0,    14, -600, 0,    18, -600, 0,    1,  0,    0,     18, 0,    0,
    1,  0,    0, 10, -205, -2088, 18, -500, 0,    1,  150,  0,    18, -200, 0,    1,  350,  0,     10, 350,  0,
    14, 500,  0, 18, 500,  0,     1,  0,    0,    18, 0,    0,    1,  -150, 0,    18, -400, 0,     1,  0,    0,
    18, 0,    0, 1,  0,    0,     18, 0,    0,    1,  0,    0,    18, 0,    0,    1,  0,    0,     18, 0,    0,
    1,  200,  0, 18, 20,   0,     1,  50,   0,    14, -350, 0,    18, -350, 0,    1,  0,    0,     7,  -20,  0,
    14, 100,  0, 18, 100,  0,     1,  0,    0,    18, 0,    0,    1,  0,    0,    18, 0,    0,     1,  0,    0,
    18, 0,    0
};

u8 npc_1_contract20_tex_index[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_contract2 = {
    { cKF_ckcb_r_npc_1_contract2_tbl, cKF_ds_npc_1_contract2_tbl, cKF_kn_npc_1_contract2_tbl, cKF_c_npc_1_contract2_tbl,
      -1, 18 },
    1.0f,
    18.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_contract20_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
