#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_lovelove_f2_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_lovelove_f2_tbl[] = { 9, 7, 7, 2, 7, 7,  2, 9, 7,  2, 9,  2, 2,  7, 2, 2, 7, 7,
                                       2, 7, 2, 2, 7, 2,  2, 9, 2,  2, 10, 2, 10, 9, 9, 2, 2, 2,
                                       2, 2, 2, 2, 2, 11, 2, 2, 13, 2, 2,  2, 10, 9, 9, 2, 9, 2 };

s16 cKF_c_npc_1_lovelove_f2_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_lovelove_f2_tbl[] = {
    1,  -201, 0,    1,  -201, 0,     11, 0,    1067, 16, 150,  520,  21, 175,  0,     36, 0,    -884, 41, -150, -556,
    46, -200, 0,    51, -200, 0,     1,  1075, -244, 9,  925,  0,    16, 1100, 0,     26, 1075, -244, 34, 925,  0,
    41, 1100, 0,    51, 1075, -244,  1,  150,  -231, 9,  0,    0,    16, 175,  0,     26, 150,  -231, 34, 0,    0,
    41, 175,  0,    51, 150,  -231,  1,  0,    0,    51, 0,    0,    1,  15,   -79,   11, -50,  0,    19, 15,   78,
    26, 15,   -79,  36, -50,  0,     44, 15,   78,   51, 15,   -79,  1,  30,   0,     11, 0,    0,    16, 0,    0,
    26, -30,  0,    36, 0,    0,     41, 0,    0,    51, 30,   0,    1,  -175, 0,     51, -175, 0,    1,  0,    0,
    4,  0,    0,    9,  -250, 0,     16, 0,    0,    26, 0,    0,    29, 0,    0,     34, -250, 0,    41, 0,    0,
    51, 0,    0,    1,  100,  0,     9,  65,   0,    16, -65,  0,    26, -65,  0,     34, 65,   0,    41, 100,  0,
    51, 100,  0,    1,  0,    0,     51, 0,    0,    1,  250,  0,    4,  250,  0,     9,  500,  0,    16, 250,  0,
    26, 250,  0,    29, 250,  0,     34, 500,  0,    41, 250,  0,    51, 250,  0,     1,  0,    0,    51, 0,    0,
    1,  0,    0,    51, 0,    0,     1,  120,  0,    9,  -285, 0,    16, -25,  0,     26, -25,  0,    34, -285, 0,
    41, 120,  0,    51, 120,  0,     1,  0,    0,    51, 0,    0,    1,  175,  0,     51, 175,  0,    1,  0,    -290,
    9,  -250, 0,    16, 0,    291,   26, 0,    -291, 34, -250, 0,    41, 0,    291,   51, -40,  -630, 1,  35,   0,
    9,  -65,  0,    16, -100, 0,     26, -100, 0,    34, -65,  0,    41, 35,   0,     51, 35,   0,    1,  0,    0,
    51, 0,    0,    1,  250,  0,     9,  500,  0,    16, 250,  0,    26, 250,  0,     34, 500,  0,    41, 250,  0,
    51, 250,  0,    1,  0,    0,     51, 0,    0,    1,  0,    0,    51, 0,    0,     1,  -25,  0,    9,  -285, 0,
    16, 120,  0,    26, 120,  0,     34, -285, 0,    41, -25,  0,    51, -25,  0,     1,  0,    0,    51, 0,    0,
    1,  0,    0,    51, 0,    0,     1,  60,   1877, 6,  200,  0,    16, -250, 0,     21, -201, 687,  26, 60,   1877,
    31, 200,  0,    41, -250, 0,     46, -201, 687,  51, 60,   1877, 1,  0,    0,     51, 0,    0,    1,  0,    0,
    51, 0,    0,    1,  -210, 411,   4,  -100, 1492, 9,  200,  582,  16, 50,   -2035, 21, -220, -506, 29, -100, 1492,
    34, 200,  582,  41, 50,   -2035, 46, -220, -506, 51, -210, 411,  1,  0,    0,     51, 0,    0,    1,  -14,  -301,
    2,  -20,  0,    13, 40,   0,     18, -30,  0,    23, 20,   0,    27, -20,  0,     38, 40,   0,    44, -30,  0,
    48, 20,   0,    51, -14,  -301,  1,  25,   -298, 7,  -70,  0,    13, 35,   259,   18, 50,   0,    26, 25,   -298,
    32, -70,  0,    38, 35,   259,   43, 50,   0,    51, 25,   -298, 1,  -20,  0,     7,  50,   0,    13, -40,  0,
    20, 30,   0,    26, -20,  0,     32, 50,   0,    38, -40,  0,    45, 30,   0,     51, -20,  0,    1,  -600, 0,
    51, -600, 0,    1,  -750, 0,     51, -750, 0,    1,  20,   0,    51, 20,   0,     1,  0,    0,    51, 0,    0,
    1,  -50,  0,    51, -50,  0,     1,  0,    0,    51, 0,    0,    1,  0,    0,     51, 0,    0,    1,  0,    0,
    51, 0,    0,    1,  420,  -1515, 11, 200,  0,    15, 500,  0,    20, 200,  0,     24, 500,  0,    26, 420,  -1604,
    36, 200,  0,    40, 500,  0,     45, 200,  0,    49, 500,  0,    51, 420,  -1716, 1,  0,    0,    51, 0,    0,
    1,  -100, 0,    51, -100, 0,     1,  150,  0,    5,  -50,  0,    8,  100,  0,     13, -150, 0,    17, 150,  0,
    22, -150, 0,    26, 150,  0,     30, -50,  0,    33, 100,  0,    38, -150, 0,     42, 150,  0,    47, -150, 0,
    51, 150,  0,    1,  300,  0,     51, 300,  0,    1,  -50,  0,    51, -50,  0,     1,  175,  0,    51, 175,  0,
    1,  15,   -282, 4,  -20,  0,     15, 40,   0,    20, -30,  0,    25, 20,   0,     29, -20,  0,    40, 40,   0,
    46, -30,  0,    50, 20,   0,     51, 15,   -282, 1,  55,   -298, 5,  20,   0,     13, 65,   259,  18, 80,   0,
    26, 55,   -298, 30, 20,   0,     38, 65,   259,  43, 80,   0,    51, 55,   -298,  1,  20,   0,    8,  -50,  0,
    13, 40,   0,    21, -30,  0,     26, 20,   0,    32, -50,  0,    38, 40,   0,     46, -30,  0,    51, 20,   0,
    1,  0,    0,    51, 0,    0,     1,  -300, 0,    6,  -100, 0,    9,  -100, 0,     16, -300, 0,    26, -300, 0,
    31, -100, 0,    34, -100, 0,     41, -300, 0,    51, -300, 0,    1,  0,    0,     51, 0,    0
};

u8 npc_1_lovelove_f20_tex_index[] = { 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                                      2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };

aNPC_Animation_c cKF_ba_r_npc_1_lovelove_f2 = {
    { cKF_ckcb_r_npc_1_lovelove_f2_tbl, cKF_ds_npc_1_lovelove_f2_tbl, cKF_kn_npc_1_lovelove_f2_tbl,
      cKF_c_npc_1_lovelove_f2_tbl, -1, 51 },
    1.0f,
    51.0f,
    cKF_FRAMECONTROL_REPEAT,
    0.0f,
    NULL,
    aNPC_EYE_TEX0,
    5,
    npc_1_lovelove_f20_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
