#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_to_deck_d1_tbl[] = {
    56, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 7, 3, 7, 0, 7, 7, 0, 7, 7, 7, 7, 0, 7, 0, 0
};

s16 cKF_kn_npc_1_to_deck_d1_tbl[] = { 6, 6, 4, 5, 2, 2, 8, 9, 9, 2, 9, 2, 2, 2, 2, 6, 9, 8, 2, 9, 2, 2, 2, 2, 5, 7, 5,
                                      7, 5, 6, 4, 2, 2, 7, 6, 2, 2, 2, 2, 5, 5, 2, 2, 2, 2, 2, 2, 6, 6, 2, 2, 2, 2 };

s16 cKF_c_npc_1_to_deck_d1_tbl[] = { 0, 0,    900, 0, 0,   1800, 0,    0, 1800, 0, 900, 0, 0, 0,
                                     0, -900, 0,   0, 900, 0,    -900, 0, 0,    0, 0,   0, 0, -900 };

s16 cKF_ds_npc_1_to_deck_d1_tbl[] = {
    1,  0,    0,    15, 0,    0,    48, -200,  0,    56, 250,  1806, 63, 0,    -3005, 79, -1000, 0,    1,  1000,  0,
    55, 1000, 0,    61, 1075, 0,    67, 1000,  0,    73, 1150, 0,    79, 1000, 0,     1,  0,     0,    25, 1500,  3601,
    56, 5000, 0,    79, 6000, 0,    1,  0,     0,    15, 500,  -735, 39, -950, -2071, 58, -1850, 0,    79, -450,  0,
    1,  0,    0,    79, 0,    0,    1,  0,     0,    79, 0,    0,    1,  -175, 0,     15, -341,  320,  26, -200,  0,
    39, -350, 0,    46, -160, 0,    49, -175,  -185, 58, -175, 0,    79, -175, 0,     1,  -100,  0,    15, -38,   -1786,
    19, -200, 0,    32, 200,  0,    39, 50,    -384, 46, 0,    -403, 49, -60,  -400,  58, -100,  0,    79, -100,  0,
    1,  25,   0,    15, 36,   -362, 19, 0,     0,    26, 60,   0,    32, -40,  0,     39, 250,   0,    49, -25,   0,
    58, 25,   0,    79, 25,   0,    1,  0,     0,    79, 0,    0,    1,  200,  0,     15, 194,   -467, 26, 0,     0,
    32, 320,  0,    39, 0,    0,    46, 180,   0,    49, 150,  0,    58, 200,  0,     79, 200,   0,    1,  0,     0,
    79, 0,    0,    1,  0,    0,    79, 0,     0,    1,  -100, 0,    79, -100, 0,     1,  0,     0,    79, 0,     0,
    1,  175,  0,    16, 70,   0,    29, -100,  0,    42, 200,  0,    49, 175,  0,     79, 175,   0,    1,  -100,  0,
    16, -60,  516,  22, 70,   0,    29, -200,  -419, 39, -300, -561, 42, -350, 0,     49, -150,  474,  58, -100,  0,
    79, -100, 0,    1,  -25,  0,    16, -110,  595,  22, 0,    248,  29, 75,   894,   36, 180,   0,    42, -200,  0,
    49, -25,  0,    79, -25,  0,    1,  0,     0,    79, 0,    0,    1,  200,  0,     16, 100,   0,    22, 200,   0,
    29, 0,    0,    36, 350,  1401, 39, 400,   0,    47, 0,    0,    58, 0,    0,     79, 200,   0,    1,  0,     0,
    79, 0,    0,    1,  0,    0,    79, 0,     0,    1,  -100, 0,    79, -100, 0,     1,  0,     0,    79, 0,     0,
    1,  0,    0,    12, 250,  392,  21, 300,   0,    41, 100,  -878, 56, -100, 0,     1,  60,    0,    21, 100,   0,
    29, 50,   -493, 41, -150, 0,    50, 0,     1080, 60, 200,  0,    79, 60,   0,     1,  0,     0,    12, -164,  0,
    20, 0,    1011, 37, 400,  0,    56, -100,  0,    1,  82,   0,    20, 140,  -6,    29, 50,    -775, 40, -200,  0,
    50, -50,  1019, 60, 250,  0,    79, 82,    0,    1,  0,    0,    15, -128, 0,     20, -50,   788,  37, 400,   0,
    56, -100, 0,    1,  0,    0,    15, -64,   -99,  33, -100, 0,    45, 100,  0,     58, -100,  0,    79, 0,     0,
    1,  2,    0,    15, 100,  0,    58, 100,   0,    79, 2,    0,    1,  0,    0,     79, 0,     0,    1,  0,     0,
    79, 0,    0,    1,  58,   0,    15, 150,   0,    26, 60,   -725, 39, -750, -1317, 52, -1050, 0,    58, -1050, 0,
    79, 58,   0,    1,  -564, -241, 15, -450,  0,    26, -570, 0,    39, 0,    0,     58, 0,     0,    79, -564,  -235,
    1,  0,    0,    79, 0,    0,    1,  -57,   0,    79, -57,  0,    1,  0,    0,     79, 0,     0,    1,  0,     0,
    79, 0,    0,    1,  58,   0,    15, -1050, 0,    33, -750, 1501, 45, 58,   0,     79, 58,    0,    1,  564,   0,
    15, 0,    0,    33, 0,    0,    45, 564,   0,    79, 564,  0,    1,  0,    0,     79, 0,     0,    1,  -57,   0,
    79, -57,  0,    1,  0,    0,    79, 0,     0,    1,  0,    0,    79, 0,    0,     1,  0,     0,    79, 0,     0,
    1,  0,    0,    79, 0,    0,    1,  0,     0,    15, -200, -188, 33, -200, -204,  45, -300,  0,    58, -50,   265,
    79, 0,    0,    1,  0,    0,    15, 0,     0,    30, -50,  0,    45, 0,    0,     62, -50,   0,    79, 0,     0,
    1,  0,    0,    79, 0,    0,    1,  0,     0,    79, 0,    0,    1,  0,    0,     79, 0,     0,    1,  0,     0,
    79, 0,    0
};

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

aNPC_Animation_c cKF_ba_r_npc_1_to_deck_d1 = {
    { cKF_ckcb_r_npc_1_to_deck_d1_tbl, cKF_ds_npc_1_to_deck_d1_tbl, cKF_kn_npc_1_to_deck_d1_tbl,
      cKF_c_npc_1_to_deck_d1_tbl, -1, 79 },
    1.0f,
    79.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    npc_1_to_deck_d10_tex_index,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
