#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_deru1_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_deru1_tbl[] = { 3, 6, 5, 2, 7, 2, 7, 6, 7, 2, 7, 2, 2, 7, 2, 7, 7, 8, 2, 8, 2, 2, 9, 2, 2, 5, 2,
                                 2, 5, 2, 2, 7, 2, 7, 7, 6, 2, 6, 2, 7, 7, 5, 2, 6, 2, 4, 4, 4, 2, 8, 2, 2, 7, 2 };

s16 cKF_c_npc_1_deru1_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_deru1_tbl[] = {
    1,  0,     0,      5,  0,     0,     57, 0,     0,     1,  -500, 0,     3,  500,  15952, 21, 4000, 0,
    37, 1000,  -11179, 39, 750,   0,     57, 1000,  0,     1,  0,    0,     9,  -250, 0,     21, 500,  0,
    37, 0,     0,      57, 0,     0,     1,  0,     0,     57, 0,    0,     1,  0,    0,     5,  -100, -782,
    35, -3450, -1878,  37, -3600, -1872, 38, -3640, 0,     39, -100, 0,     57, 0,    0,     1,  0,    0,
    57, 0,     0,      1,  -175,  0,     9,  -25,   0,     33, -50,  0,     37, -138, -1348, 39, -275, 0,
    55, -178,  47,     57, -175,  0,     1,  -100,  0,     9,  -250, -566,  33, -550, 0,     41, -505, 257,
    55, -135,  834,    57, -100,  0,     1,  25,    0,     9,  -50,  0,     33, 50,   0,     37, 100,  1236,
    39, 185,   0,      55, 35,    -174,  57, 25,    0,     1,  0,    0,     57, 0,    0,     1,  200,  0,
    9,  0,     0,      21, 1000,  0,     33, 450,   -1880, 39, 928,  0,     55, 270,  -1727, 57, 200,  0,
    1,  0,     0,      57, 0,     0,     1,  0,     0,     57, 0,    0,     1,  -100, 0,     9,  300,  0,
    21, -300,  0,      33, 0,     0,     39, -486,  0,     55, -135, 990,   57, -100, 0,     1,  0,    0,
    57, 0,     0,      1,  175,   0,     9,  25,    0,     33, 50,   0,     37, 175,  1688,  39, 275,  0,
    41, 269,   -219,   57, 175,   0,     1,  -100,  0,     9,  200,  375,   33, 0,    -755,  37, -100, -754,
    39, -515,  0,      55, -135,  834,   57, -100,  0,     1,  -25,  0,     9,  50,   0,     33, -50,  0,
    37, -25,   0,      39, -185,  0,     41, -175,  190,   55, -35,  175,   57, -25,  0,     1,  0,    0,
    57, 0,     0,      1,  200,   0,     9,  0,     0,     21, 200,  1264,  33, 450,  -1880, 37, 200,  -1942,
    39, 928,   0,      55, 270,   -1727, 57, 200,   0,     1,  0,    0,     57, 0,    0,     1,  0,    0,
    57, 0,     0,      1,  -100,  0,     9,  300,   0,     21, 150,  0,     33, 300,  0,     35, 225,  -2569,
    37, -100,  -6485,  39, -486,  0,     55, -135,  972,   57, -100, 0,     1,  0,    0,     57, 0,    0,
    1,  0,     0,      57, 0,     0,     1,  60,    3670,  5,  500,  0,     29, 450,  0,     45, -200, 0,
    57, 60,    0,      1,  0,     0,     57, 0,     0,     1,  0,    0,     57, 0,    0,     1,  82,   3419,
    7,  500,   0,      33, 450,   0,     49, -200,  0,     57, 82,   0,     1,  0,    0,     57, 0,    0,
    1,  0,     0,      57, 0,     0,     1,  100,   0,     5,  -350, -2893, 9,  -500, 0,     17, -500, 0,
    35, 0,     0,      45, -100,  0,     57, 2,     0,     1,  0,    0,     57, 0,    0,     1,  -400, 0,
    3,  -500,  0,      7,  -450,  746,   21, 0,     0,     29, -550, 0,     45, -50,  375,   57, 0,    0,
    1,  -200,  0,      3,  -500,  -1902, 7,  -700,  0,     21, -250, 0,     29, -400, 0,     45, -100, 747,
    57, 58,    0,      1,  200,   0,     3,  250,   0,     7,  250,  0,     29, 73,   -720,  45, -400, -823,
    57, -564,  0,      1,  0,     0,     57, 0,     0,     1,  -100, 0,     3,  -300, 0,     7,  -100, 499,
    27, 0,     0,      41, -450,  0,     57, -57,   0,     1,  0,    0,     57, 0,    0,     1,  450,  0,
    3,  500,   0,      7,  450,   -752,  21, 0,     0,     29, 550,  0,     45, 53,   -391,  57, 0,    0,
    1,  -400,  0,      3,  -500,  -1261, 7,  -700,  0,     21, -250, 0,     29, -400, 0,     45, -100, 753,
    57, 58,    0,      1,  -250,  0,     3,  -250,  0,     29, -75,  642,   45, 400,  832,   57, 564,  0,
    1,  0,     0,      57, 0,     0,     1,  -100,  0,     3,  -300, 0,     7,  -100, 501,   27, 0,    0,
    41, -450,  0,      57, -57,   0,     1,  0,     0,     57, 0,    0,     1,  515,  0,     25, 450,  -135,
    41, 300,   -511,   57, 0,     0,     1,  409,   0,     25, 0,    -751,  41, -300, 0,     57, 0,    0,
    1,  111,   0,      25, 350,   759,   41, 700,   0,     57, 0,    0,     1,  0,    0,     57, 0,    0,
    1,  0,     0,      5,  400,   0,     15, -400,  -1494, 21, -500, 0,     29, -228, 2609,  37, 50,   0,
    45, -75,   0,      57, 0,     0,     1,  0,     0,     57, 0,    0,     1,  0,    0,     57, 0,    0,
    1,  -225,  0,      7,  0,     0,     19, 0,     0,     29, -200, 0,     39, -200, 0,     49, 0,    0,
    57, 0,     0,      1,  0,     0,     57, 0,     0
};

u8 npc_1_deru10_tex_index[] = { 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5,
                                5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3 };

u8 npc_1_deru11_tex_index[] = { 6, 6, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
                                3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0 };

aNPC_Animation_c cKF_ba_r_npc_1_deru1 = {
    { cKF_ckcb_r_npc_1_deru1_tbl, cKF_ds_npc_1_deru1_tbl, cKF_kn_npc_1_deru1_tbl, cKF_c_npc_1_deru1_tbl, -1, 57 },
    1.0f,
    57.0f,
    cKF_FRAMECONTROL_STOP,
    -10.0f,
    npc_1_deru11_tex_index,
    aNPC_EYE_TEX0,
    -1,
    npc_1_deru10_tex_index,
    aNPC_MOUTH_TEX0,
    -1,
    -1,
    -1,
    NULL,
    NULL,
};
