#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_keitai_off1_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_keitai_off1_tbl[] = { 2, 6, 2, 6, 5, 8, 2, 2, 2, 2, 2, 2, 2,  2,  2, 2, 2, 2,
                                       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9,  8,  6, 7, 7, 7,
                                       2, 6, 5, 9, 8, 8, 2, 9, 8, 8, 6, 7, 10, 11, 9, 2, 2, 2 };

s16 cKF_c_npc_1_keitai_off1_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_keitai_off1_tbl[] = {
    1,  -1000, 0,     61, -1000, 0,    1,  2000,  0,   5,  2000, 0,     17, 1500,  0,     23, 1500, 0,
    41, 1000,  0,     61, 1000,  0,    1,  6000,  0,   61, 6000, 0,     1,  -450,  0,     28, -450, 0,
    34, -400,  695,   41, -250,  0,    49, -250,  0,   61, -450, 0,     1,  80,    0,     7,  100,  79,
    12, 100,   -83,   17, 80,    0,    61, 0,     0,   1,  0,    0,     7,  20,    83,    12, 20,   -81,
    17, 0,     0,     41, -10,   0,    45, 0,     0,   49, -10,  0,     61, 0,     0,     1,  -175, 0,
    61, -175,  0,     1,  -100,  0,    61, -100,  0,   1,  25,   0,     61, 25,    0,     1,  0,    0,
    61, 0,     0,     1,  200,   0,    61, 200,   0,   1,  0,    0,     61, 0,     0,     1,  0,    0,
    61, 0,     0,     1,  -100,  0,    61, -100,  0,   1,  0,    0,     61, 0,     0,     1,  175,  0,
    61, 175,   0,     1,  -100,  0,    61, -100,  0,   1,  -25,  0,     61, -25,   0,     1,  0,    0,
    61, 0,     0,     1,  200,   0,    61, 200,   0,   1,  0,    0,     61, 0,     0,     1,  0,    0,
    61, 0,     0,     1,  -100,  0,    61, -100,  0,   1,  0,    0,     61, 0,     0,     1,  0,    0,
    61, 0,     0,     1,  60,    0,    61, 60,    0,   1,  0,    0,     61, 0,     0,     1,  0,    0,
    61, 0,     0,     1,  80,    0,    61, 82,    0,   1,  0,    0,     61, 0,     0,     1,  -80,  0,
    5,  -80,   0,     17, -100,  0,    23, -100,  0,   41, 350,  0,     45, 320,   0,     49, 350,  0,
    55, 250,   -1119, 61, 0,     0,    1,  50,    0,   5,  50,   0,     17, -230,  0,     28, -200, 192,
    34, -180,  -186,  41, -300,  0,    49, -300,  0,   61, 2,    0,     1,  -100,  0,     28, 0,    0,
    41, -190,  0,     45, -150,  0,    49, -190,  0,   61, 0,    0,     1,  0,     0,     5,  0,    0,
    17, 500,   0,     20, 550,   1445, 28, 700,   0,   41, 0,    0,     61, 0,     0,     1,  50,   0,
    5,  50,    0,     17, -1100, 0,    20, -1190, 0,   28, -650, 0,     41, 50,    0,     61, 58,   0,
    1,  -650,  0,     5,  -650,  0,    17, -750,  0,   20, -800, -1032, 28, -1000, 0,     41, -650, 0,
    61, -564,  -235,  1,  0,     0,    61, 0,     0,   1,  -250, 0,     5,  -250,  0,     17, -50,  0,
    28, -500,  0,     41, -250,  0,    61, -57,   0,   1,  0,    0,     17, 0,     0,     28, -250, 0,
    41, 0,     0,     61, 0,     0,    1,  600,   0,   5,  600,  0,     16, -350,  0,     24, -350, 0,
    34, -600,  0,     41, -440,  0,    45, -500,  0,   49, -440, 0,     61, 0,     0,     1,  -200, 0,
    5,  -200,  0,     16, -420,  0,    24, -420,  0,   41, -710, 0,     45, -750,  0,     49, -710, 0,
    61, 58,    0,     1,  -100,  0,    5,  -100,  0,   16, 670,  0,     24, 670,   0,     41, 990,  0,
    45, 1050,  0,     49, 990,   0,    61, 564,   0,   1,  0,    0,     61, 0,     0,     1,  -350, 0,
    5,  -350,  0,     16, -500,  0,    24, -500,  0,   37, -400, 1003,  41, -310,  0,     45, -250, 0,
    49, -310,  0,     61, -57,   0,    1,  0,     0,   5,  0,    0,     16, 250,   0,     24, 250,  0,
    37, 320,   431,   41, 350,   0,    49, 350,   0,   61, 0,    0,     1,  150,   0,     5,  150,  0,
    11, -130,  -1826, 17, -300,  0,    22, -45,   0,   32, -350, -2131, 41, -1040, -2061, 61, 0,    0,
    1,  100,   0,     5,  100,   0,    17, -280,  0,   26, -280, 0,     41, 700,   2378,  61, 0,    0,
    1,  50,    0,     5,  50,    0,    17, 620,   0,   26, 630,  0,     32, 750,   0,     41, 200,  -1461,
    61, 0,     0,     1,  -50,   0,    3,  -50,   0,   10, 50,   481,   17, 100,   0,     20, 100,  0,
    41, 270,   0,     45, 280,   0,    49, 270,   0,   55, 220,  -582,  61, 0,     0,     1,  50,   0,
    3,  50,    0,     10, -30,   -288, 17, -40,   275, 22, 20,   0,     28, -60,   -411,  36, -100, 210,
    41, -20,   0,     45, -50,   0,    49, -20,   0,   61, 0,    0,     1,  50,    0,     3,  50,   0,
    10, 10,    -130,  17, 0,     0,    28, 0,     0,   41, -30,  0,     45, -50,   0,     49, -30,  0,
    61, 0,     0,     1,  0,     0,    61, 0,     0,   1,  0,    0,     61, 0,     0,     1,  0,    0,
    61, 0,     0
};

aNPC_Animation_c cKF_ba_r_npc_1_keitai_off1 = {
    { cKF_ckcb_r_npc_1_keitai_off1_tbl, cKF_ds_npc_1_keitai_off1_tbl, cKF_kn_npc_1_keitai_off1_tbl,
      cKF_c_npc_1_keitai_off1_tbl, -1, 61 },
    1.0f,
    61.0f,
    cKF_FRAMECONTROL_STOP,
    -5.0f,
    NULL,
    aNPC_EYE_TEX0,
    0,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
