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

s16 cKF_kn_npc_1_ensou_e1_tbl[] = { 2, 2, 2, 3, 3, 3, 3, 3, 3, 9, 9, 9, 10, 9,  10, 10, 10, 10, 2,  2, 2, 2, 2, 2, 2, 2,
                                    2, 2, 2, 2, 2, 3, 9, 7, 7, 7, 7, 7, 7,  10, 10, 10, 11, 11, 11, 9, 8, 8, 2, 2, 2 };

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

s16 cKF_ds_npc_1_ensou_e1_tbl[] = {
    1,  0,    0,   65, 0,    0,     1,  722,  0, 65, 722,  0,     1,  0,    0,    65, 0,    0,   1,  0,    0,
    33, 0,    0,   65, 0,    0,     1,  60,   0, 33, 80,   0,     65, 60,   0,    1,  50,   0,   33, 50,   0,
    65, 50,   0,   1,  0,    0,     32, 0,    0, 65, 0,    0,     1,  -520, 0,    32, -500, 0,   65, -520, 0,
    1,  -100, 0,   32, -100, 0,     65, -100, 0, 1,  0,    0,     9,  0,    0,    17, 0,    0,   25, 0,    0,
    33, 0,    0,   41, 0,    0,     49, 0,    0, 57, 0,    0,     65, 0,    0,    1,  450,  0,   9,  420,  0,
    17, 450,  0,   25, 420,  0,     33, 450,  0, 41, 420,  0,     49, 450,  0,    57, 420,  0,   65, 453,  0,
    1,  -100, 0,   9,  -100, 0,     17, -100, 0, 25, -100, 0,     33, -100, 0,    41, -100, 0,   49, -100, 0,
    57, -100, 0,   65, -100, 0,     1,  25,   0, 2,  25,   0,     9,  25,   0,    17, 25,   0,   25, 25,   0,
    33, 25,   0,   41, 25,   0,     49, 25,   0, 57, 25,   0,     65, 25,   0,    1,  0,    0,   9,  165,  0,
    17, 60,   0,   25, 165,  0,     33, 60,   0, 41, 165,  0,     49, 30,   0,    57, 165,  0,   65, 0,    0,
    1,  105,  0,   2,  105,  0,     9,  105,  0, 17, 105,  0,     25, 105,  0,    33, 105,  0,   41, 105,  0,
    49, 105,  0,   57, 105,  0,     65, 105,  0, 1,  0,    0,     9,  -50,  0,    17, 0,    0,   25, -50,  0,
    33, 0,    0,   41, -50,  0,     49, 0,    0, 57, -50,  0,     64, -3,   171,  65, 0,    0,   1,  -800, 0,
    9,  -800, 0,   17, -800, 0,     25, -800, 0, 33, -800, 0,     41, -800, 0,    49, -800, 0,   57, -800, 0,
    64, -800, 0,   65, -800, 0,     1,  100,  0, 9,  100,  0,     17, 100,  0,    25, 100,  0,   33, 100,  0,
    41, 100,  0,   49, 100,  0,     57, 100,  0, 64, 100,  0,     65, 100,  0,    1,  0,    0,   65, 0,    0,
    1,  0,    0,   65, 0,    0,     1,  600,  0, 65, 600,  0,     1,  0,    0,    65, 0,    0,   1,  0,    0,
    65, 0,    0,   1,  0,    0,     65, 0,    0, 1,  0,    0,     65, 0,    0,    1,  0,    0,   65, 0,    0,
    1,  0,    0,   65, 0,    0,     1,  0,    0, 65, 0,    0,     1,  0,    0,    65, 0,    0,   1,  0,    0,
    65, 0,    0,   1,  100,  0,     65, 100,  0, 1,  -200, 0,     33, -160, 0,    65, -200, 0,   1,  -170, 0,
    9,  -160, 0,   17, -170, 0,     25, -160, 0, 33, -170, 0,     41, -160, 0,    49, -170, 0,   57, -160, 0,
    65, -170, 0,   1,  0,    0,     9,  0,    0, 17, 150,  0,     25, 150,  0,    33, -300, 0,   57, -300, 0,
    65, 0,    0,   1,  -480, 0,     9,  -480, 0, 17, -545, 0,     25, -545, 0,    33, -530, 0,   57, -530, 0,
    65, -480, 0,   1,  -400, 0,     9,  -400, 0, 17, -400, 0,     25, -400, 0,    33, -300, 0,   57, -300, 0,
    65, -400, 0,   1,  -300, 0,     9,  -300, 0, 17, -300, 0,     25, -300, 0,    33, -170, 0,   57, -170, 0,
    65, -300, 0,   1,  -480, 0,     9,  -480, 0, 17, -480, 0,     25, -480, 0,    33, -230, 0,   57, -230, 0,
    65, -480, 0,   1,  0,    0,     9,  0,    0, 17, 0,    0,     25, 0,    0,    33, -200, 0,   57, -200, 0,
    65, 0,    0,   1,  -15,  -1454, 7,  -260, 0, 15, -40,  0,     23, -190, 0,    31, -40,  0,   39, -190, 0,
    47, -40,  0,   55, -260, 0,     63, 30,   0, 65, -15,  -1454, 1,  -80,  -283, 7,  -130, 0,   15, -80,  0,
    23, -120, 0,   31, -80,  0,     39, -120, 0, 47, -80,  0,     55, -130, 0,    63, -70,  0,   65, -80,  -283,
    1,  -250, 0,   7,  -250, 0,     15, -250, 0, 23, -250, 0,     31, -250, 0,    39, -250, 0,   47, -250, 0,
    55, -250, 0,   63, -250, 0,     65, -250, 0, 1,  100,  0,     9,  -130, 0,    17, 70,   0,   25, -80,  0,
    33, 70,   0,   41, -80,  0,     49, 70,   0, 57, -130, 0,     63, 70,   761,  64, 93,   572, 65, 100,  0,
    1,  -600, 0,   9,  -600, 0,     17, -600, 0, 25, -600, 0,     33, -600, 0,    41, -600, 0,   49, -600, 0,
    57, -600, 0,   63, -600, 0,     64, -600, 0, 65, -600, 0,     1,  0,    0,    9,  -170, 0,   17, -30,  0,
    25, -100, 0,   33, -30,  0,     41, -100, 0, 49, -30,  0,     57, -170, 0,    63, -20,  519, 64, -5,   351,
    65, 0,    0,   1,  0,    0,     5,  0,    0, 17, -30,  0,     21, -30,  0,    33, 50,   76,  43, 60,   0,
    53, 50,   -75, 63, 0,    0,     65, 0,    0, 1,  -50,  0,     5,  -50,  0,    17, -100, 0,   21, -100, 0,
    31, -140, 0,   49, -140, 0,     63, -50,  0, 65, -50,  0,     1,  100,  0,    5,  100,  0,   17, 180,  0,
    21, 180,  0,   31, 200,  0,     49, 210,  0, 63, 100,  0,     65, 100,  0,    1,  0,    0,   65, 0,    0,
    1,  0,    0,   65, 0,    0,     1,  0,    0, 65, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_ensou_e1 = {
    { cKF_ckcb_r_npc_1_ensou_e1_tbl, cKF_ds_npc_1_ensou_e1_tbl, cKF_kn_npc_1_ensou_e1_tbl, cKF_c_npc_1_ensou_e1_tbl, -1,
      65 },
    1.0f,
    65.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
