#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_contract3_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_contract3_tbl[] = { 2, 4, 4, 4, 4, 4, 5, 7, 7, 3, 7, 3, 3, 8, 7, 8, 10, 8, 3, 8, 3, 3, 9, 9, 3, 3, 3,
                                     3, 3, 3, 4, 4, 4, 5, 5, 4, 3, 5, 3, 4, 4, 3, 4, 5,  3, 3, 3, 3, 5, 5, 5, 2, 2, 2 };

s16 cKF_c_npc_1_contract3_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_contract3_tbl[] = {
    1,  0,    0,    29, 0,    0,     1,  950,  0,     10, 950,  0,    16, 950,  0,     29, 1000, 0,     1,  50,   0,
    10, -750, 0,    16, -750, 0,     29, 0,    0,     1,  0,    0,    10, 100,  0,     16, 100,  0,     29, 0,    0,
    1,  60,   0,    10, 30,   0,     16, 30,   0,     29, 0,    0,    1,  100,  0,     10, 125,  0,     16, 125,  0,
    29, 0,    0,    1,  -198, 0,     10, -200, 0,     19, -200, 0,    21, -193, 134,   29, -175, 0,     1,  90,   0,
    10, 35,   0,    16, 35,   0,     18, 40,   141,   21, 90,   762,  22, 108,  0,     29, -100, 0,     1,  -53,  0,
    10, -75,  0,    16, -75,  0,     18, -55,  697,   21, 15,   694,  22, 35,   0,     29, 25,   0,     1,  0,    0,
    10, 0,    0,    29, 0,    0,     1,  30,   0,     10, 0,    0,    16, 0,    0,     18, 58,   1758,  21, 233,  1722,
    22, 303,  0,    29, 200,  0,     1,  0,    0,     10, 0,    0,    29, 0,    0,     1,  0,    0,     10, 0,    0,
    29, 0,    0,    1,  -38,  0,     10, 33,   0,     16, 33,   0,    18, -28,  -1856, 21, -215, -1958, 22, -263, 0,
    25, -230, 932,  29, -100, 0,     1,  -55,  0,     10, -25,  0,    16, -25,  0,     18, -45,  -436,  21, -85,  0,
    25, -50,  509,  29, 0,    0,     1,  163,  0,     10, 190,  0,    16, 190,  0,     19, 235,  0,     22, 205,  0,
    23, 213,  0,    25, 210,  -156,  29, 175,  0,     1,  -188, 0,    10, -165, 0,     16, -165, 0,     19, -330, 0,
    22, -255, 1007, 23, -228, 235,   24, -220, 236,   26, -178, 980,  28, -118, 750,   29, -100, 0,     1,  -183, 0,
    10, -225, 0,    16, -225, 0,     19, -165, 712,   22, -95,  689,  24, -77,  77,    26, -55,  454,   29, -25,  0,
    1,  0,    0,    10, 0,    0,     29, 0,    0,     1,  620,  0,    10, 528,  0,     16, 528,  0,     22, 0,    0,
    23, 60,   2950, 26, 245,  0,     27, 245,  0,     29, 200,  0,    1,  0,    0,     10, 0,    0,     29, 0,    0,
    1,  0,    0,    10, 0,    0,     29, 0,    0,     1,  -360, 0,    10, -290, 0,     16, -290, 0,     19, 0,    4480,
    22, 290,  0,    23, 180,  -3687, 24, 75,   -2551, 27, -95,  -557, 29, -100, 0,     1,  15,   0,     10, 25,   0,
    16, 25,   0,    19, -70,  -702,  22, -93,  0,     23, -68,  879,  25, -35,  293,   28, -5,   310,   29, 0,    0,
    1,  0,    0,    10, 0,    0,     29, 0,    0,     1,  60,   0,    10, 60,   0,     29, 60,   0,     1,  0,    0,
    10, 0,    0,    29, 0,    0,     1,  0,    0,     10, 0,    0,    29, 0,    0,     1,  102,  0,     10, 235,  -21,
    29, 82,   0,    1,  0,    0,     10, 0,    0,     29, 0,    0,    1,  330,  0,     10, -100, 0,     16, -100, 0,
    29, 0,    0,    1,  88,   0,     10, 150,  0,     16, 150,  0,    29, 2,    0,     1,  -50,  0,     10, -200, 0,
    16, -200, 0,    29, 0,    0,     1,  -100, 0,     10, 370,  0,    13, 320,  0,     16, 370,  0,     29, 0,    0,
    1,  25,   0,    10, 200,  0,     13, 150,  0,     16, 200,  0,    29, 58,   0,     1,  -200, 0,     10, -160, 0,
    16, -160, 0,    29, -564, 0,     1,  0,    0,     10, 0,    0,    29, 0,    0,     1,  -600, 0,     10, -900, 0,
    13, -850, 0,    16, -900, 0,     29, -57,  0,     1,  0,    0,    10, 0,    0,     29, 0,    0,     1,  -500, 0,
    10, -600, 0,    16, -600, 0,     29, 0,    0,     1,  -200, 0,    10, -400, 0,     16, -400, 0,     29, 58,   0,
    1,  500,  0,    10, 564,  0,     29, 564,  0,     1,  0,    0,    10, 250,  0,     16, 250,  0,     29, 0,    0,
    1,  -400, 0,    10, -500, 0,     13, -450, 0,     16, -500, 0,    29, -57,  0,     1,  0,    0,     10, 0,    0,
    29, 0,    0,    1,  0,    0,     10, 0,    0,     29, 0,    0,    1,  0,    0,     10, 0,    0,     29, 0,    0,
    1,  0,    0,    10, 0,    0,     29, 0,    0,     1,  20,   0,    10, 275,  0,     13, 250,  0,     16, 275,  0,
    29, 0,    0,    1,  -350, 0,     10, -450, 0,     13, -400, 0,    16, -450, 0,     29, 0,    0,     1,  100,  0,
    10, -175, 0,    13, -150, 0,     16, -175, 0,     29, 0,    0,    1,  0,    0,     29, 0,    0,     1,  0,    0,
    29, 0,    0,    1,  0,    0,     29, 0,    0
};

u8 npc_1_contract30_tex_index[] = { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 2, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_contract3 = {
    { cKF_ckcb_r_npc_1_contract3_tbl, cKF_ds_npc_1_contract3_tbl, cKF_kn_npc_1_contract3_tbl, cKF_c_npc_1_contract3_tbl,
      -1, 29 },
    1.0f,
    29.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_contract30_tex_index,
    aNPC_EYE_TEX0,
    -1,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
