#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_send_mail1_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_send_mail1_tbl[] = { 2, 8,  4, 4, 8,  7,  10, 10, 10, 2, 10, 2, 2, 10, 10, 11, 11, 11,
                                      2, 10, 2, 2, 11, 11, 2,  2,  2,  2, 2,  2, 6, 5,  7,  6,  6,  6,
                                      5, 6,  2, 5, 5,  5,  2,  7,  2,  2, 2,  2, 7, 8,  7,  2,  2,  2 };

s16 cKF_c_npc_1_send_mail1_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_send_mail1_tbl[] = {
    1,  0,    0,     38, 0,     0,     1,  1000,  0,    11, 975,  0,    14, 950,  0,    17, 975,  0,    20, 950,  0,
    25, 950,  0,     31, 1150,  961,   38, 1200,  0,    1,  0,    0,    20, 0,    0,    25, 50,   748,  38, 500,  0,
    1,  0,    0,     25, 0,     0,     36, -50,   0,    38, -50,  0,    1,  0,    0,    11, 50,   0,    14, 30,   0,
    17, 50,   0,     20, 30,    0,     25, 60,    0,    36, -200, 0,    38, -200, 0,    1,  0,    0,    11, 50,   0,
    14, 125,  0,     17, 50,    0,     20, 125,   0,    36, 25,   0,    38, 25,   0,    1,  -175, 0,    11, -190, 0,
    14, -203, 0,     17, -190,  0,     20, -200,  0,    23, -200, 0,    25, -198, 77,   32, -175, 0,    36, -200, 0,
    38, -200, 0,     1,  -100,  0,     11, 0,     0,    14, 38,   0,    17, -5,   0,    20, 35,   0,    23, 60,   507,
    25, 90,   0,     32, -230,  0,     36, -200,  227,  38, -193, 0,    1,  25,   0,    11, 15,   0,    14, -77,  0,
    17, 18,   0,     20, -75,   0,     23, -65,   177,  25, -53,  178,  32, -15,  153,  36, 0,    79,   38, 5,    60,
    1,  0,    0,     38, 0,     0,     1,  200,   0,    11, 135,  0,    14, 0,    0,    17, 150,  0,    20, 0,    0,
    23, 15,   224,   25, 30,    0,     32, 0,     0,    36, 0,    0,    38, 0,    0,    1,  0,    0,    38, 0,    0,
    1,  0,    0,     38, 0,     0,     1,  -100,  0,    11, -65,  0,    14, 23,   0,    17, -73,  0,    20, 25,   0,
    23, 3,    -399,  25, -38,   0,     32, 300,   0,    36, 185,  0,    38, 185,  0,    1,  0,    0,    11, -45,  0,
    14, -43,  0,     17, -45,   0,     20, -45,   0,    23, -48,  -76,  25, -55,  0,    32, 70,   0,    36, 45,   -152,
    38, 40,   0,     1,  175,   0,     11, 180,   0,    14, 188,  0,    17, 180,  0,    20, 190,  0,    23, 175,  -226,
    25, 163,  0,     29, 168,   0,     32, 138,   -100, 35, 128,  -103, 38, 118,  0,    1,  -100, 0,    11, -158, 0,
    14, -265, 0,     17, -158,  0,     20, -270,  0,    23, -235, 592,  25, -188, 898,  29, -55,  1219, 32, 38,   0,
    35, 5,    0,     38, 15,    0,     1,  -25,   0,    11, -113, 0,    14, -223, 0,    17, -113, 0,    20, -225, 0,
    23, -205, 302,   25, -183,  504,   29, -105,  670,  32, -45,  354,  35, -33,  0,    38, -40,  0,    1,  0,    0,
    38, 0,    0,     1,  200,   0,     11, 450,   0,    14, 650,  0,    17, 453,  0,    20, 655,  0,    23, 640,  -214,
    25, 620,  -607,  29, 325,   -3995, 32, 0,     0,    38, 50,   336,  1,  0,    0,    38, 0,    0,    1,  0,    0,
    38, 0,    0,     1,  -100,  0,     11, -235,  0,    14, -345, 0,    17, -235, 0,    20, -340, 0,    23, -345, -171,
    25, -360, 0,     29, -220,  2351,  32, 10,    312,  35, 20,   0,    38, -15,  -218, 1,  0,    0,    11, -5,   0,
    14, 0,    0,     17, -3,    0,     20, 0,     0,    23, 5,    73,   25, 15,   0,    29, 5,    -74,  32, 0,    -46,
    35, -5,   0,     38, 5,     0,     1,  0,     0,    38, 0,    0,    1,  60,   0,    38, 60,   0,    1,  0,    0,
    38, 0,    0,     1,  0,     0,     38, 0,     0,    1,  82,   0,    38, 82,   0,    1,  0,    0,    38, 0,    0,
    1,  0,    0,     14, 550,   0,     17, 500,   0,    20, 550,  0,    34, -100, -748, 38, -150, 0,    1,  2,    0,
    20, 2,    0,     29, 150,   511,   34, 200,   0,    38, 200,  0,    1,  0,    0,    14, -100, 0,    17, 0,    0,
    20, -100, 0,     25, -40,   417,   34, 0,     0,    38, 0,    0,    1,  0,    0,    14, 370,  0,    17, 320,  0,
    20, 370,  0,     34, -700,  0,     38, -550,  0,    1,  58,   0,    14, 200,  0,    17, 150,  0,    20, 200,  0,
    34, -600, -1499, 38, -700,  0,     1,  -565,  0,    14, -160, 0,    20, -160, 0,    27, -350, 0,    34, 300,  0,
    38, 175,  0,     1,  0,     0,     14, 600,   0,    20, 600,  0,    34, 0,    0,    38, 0,    0,    1,  -57,  0,
    14, -900, 0,     17, -850,  0,     20, -900,  0,    27, -755, 1453, 38, 0,    0,    1,  0,    0,    38, 0,    0,
    1,  0,    0,     14, -1000, 0,     20, -1000, 0,    29, -205, 2058, 38, 0,    0,    1,  58,   0,    14, -600, 0,
    20, -600, 0,     29, -555,  1532,  38, 150,   0,    1,  565,  0,    14, 800,  0,    20, 800,  0,    29, 200,  0,
    38, 350,  0,     1,  0,     0,     38, 0,     0,    1,  -56,  0,    7,  -600, 0,    14, -500, 0,    17, -450, 0,
    20, -500, 0,     25, -750,  0,     38, -150,  0,    1,  0,    0,    38, 0,    0,    1,  0,    0,    38, 0,    0,
    1,  0,    0,     38, 0,     0,     1,  0,     0,    38, 0,    0,    1,  0,    0,    11, 300,  0,    17, 300,  0,
    20, 275,  -736,  29, -75,   0,     36, 200,   0,    38, 200,  0,    1,  0,    0,    11, -400, 0,    14, -450, 0,
    17, -400, 0,     20, -450,  0,     29, -150,  1220, 34, 0,    0,    38, -20,  0,    1,  0,    0,    11, -75,  0,
    14, -125, 0,     17, -75,   0,     20, -125,  0,    36, 0,    0,    38, 0,    0,    1,  0,    0,    38, 0,    0,
    1,  0,    0,     38, 0,     0,     1,  0,     0,    38, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_send_mail1 = {
    { cKF_ckcb_r_npc_1_send_mail1_tbl, cKF_ds_npc_1_send_mail1_tbl, cKF_kn_npc_1_send_mail1_tbl,
      cKF_c_npc_1_send_mail1_tbl, -1, 38 },
    1.0f,
    38.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX1,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
