#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_4haku_e1_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_4haku_e1_tbl[] = { 2, 2, 2, 2, 4, 2, 2,  4, 2,  2, 10, 2, 2,  10, 2,  10, 2, 2,
                                    2, 2, 2, 2, 2, 2, 2,  2, 2,  2, 2,  2, 2,  4,  10, 8,  8, 6,
                                    6, 6, 6, 9, 9, 2, 10, 2, 10, 2, 2,  2, 10, 8,  9,  2,  2, 2 };

s16 cKF_c_npc_1_4haku_e1_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_4haku_e1_tbl[] = {
    1,  0,    0,   65, 0,    0,    1,  722,  0,  65, 722,  0,    1,  0,    0,  65, 0,    0,    1,  0,    0,
    65, 0,    0,   1,  62,   19,   27, 80,   0,  59, 60,   0,    65, 62,   19, 1,  50,   0,    65, 50,   0,
    1,  0,    0,   65, 0,    0,    1,  -518, 19, 26, -500, 0,    59, -520, 0,  65, -518, 19,   1,  -100, 0,
    65, -100, 0,   1,  0,    0,    65, 0,    0,  1,  425,  -149, 3,  420,  0,  11, 450,  0,    19, 420,  0,
    27, 450,  0,   35, 420,  0,    43, 450,  0,  51, 420,  0,    59, 453,  0,  65, 425,  -149, 1,  -100, 0,
    65, -100, 0,   1,  25,   0,    65, 25,   0,  1,  139,  711,  3,  165,  0,  11, 60,   0,    19, 165,  0,
    27, 60,   0,   35, 165,  0,    43, 30,   0,  51, 165,  0,    59, 0,    0,  65, 139,  711,  1,  105,  0,
    65, 105,  0,   1,  -42,  -210, 3,  -50,  0,  11, 0,    0,    19, -50,  0,  27, 0,    0,    35, -50,  0,
    43, 0,    0,   51, -50,  0,    59, 0,    0,  65, -42,  -210, 1,  -800, 0,  65, -800, 0,    1,  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,  -196, 34,
    27, -160, 0,   59, -200, 0,    65, -196, 34, 1,  -162, 41,   3,  -160, 0,  11, -170, 0,    19, -160, 0,
    27, -170, 0,   35, -160, 0,    43, -170, 0,  51, -160, 0,    59, -170, 0,  65, -162, 41,   1,  0,    0,
    3,  0,    0,   11, 150,  0,    19, 150,  0,  27, -300, 0,    51, -300, 0,  59, 0,    0,    65, 0,    0,
    1,  -480, 0,   3,  -480, 0,    11, -545, 0,  19, -545, 0,    27, -530, 0,  51, -530, 0,    59, -480, 0,
    65, -480, 0,   1,  -400, 0,    19, -400, 0,  27, -300, 0,    51, -300, 0,  59, -400, 0,    65, -400, 0,
    1,  -300, 0,   19, -300, 0,    27, -170, 0,  51, -170, 0,    59, -300, 0,  65, -300, 0,    1,  -480, 0,
    19, -480, 0,   27, -230, 0,    51, -230, 0,  59, -480, 0,    65, -480, 0,  1,  0,    0,    19, 0,    0,
    27, -200, 0,   51, -200, 0,    59, 0,    0,  65, 0,    0,    1,  -260, 0,  9,  -40,  0,    17, -190, 0,
    25, -40,  0,   33, -190, 0,    41, -40,  0,  49, -260, 0,    57, 150,  0,  65, -260, 0,    1,  -130, 0,
    9,  -80,  0,   17, -120, 0,    25, -80,  0,  33, -120, 0,    41, -80,  0,  49, -130, 0,    57, -50,  0,
    65, -130, 0,   1,  -250, 0,    65, -250, 0,  1,  -94,  -956, 3,  -130, 0,  11, 70,   0,    19, -80,  0,
    27, 70,   0,   35, -80,  0,    43, 70,   0,  51, -130, 0,    59, 100,  0,  65, -94,  -956, 1,  -600, 0,
    65, -600, 0,   1,  -143, -725, 3,  -170, 0,  11, -30,  0,    19, -100, 0,  27, -30,  0,    35, -100, 0,
    43, -30,  0,   51, -170, 0,    59, 0,    0,  65, -143, -725, 1,  0,    0,  65, 0,    0,    1,  0,    0,
    65, 0,    0,   1,  0,    0,    65, 0,    0,  1,  -2,   -63,  11, -30,  0,  15, -30,  0,    27, 50,   76,
    37, 60,   0,   47, 50,   -75,  57, 0,    0,  59, 0,    0,    63, 0,    0,  65, -2,   -63,  1,  -54,  -105,
    11, -100, 0,   15, -100, 0,    25, -140, 0,  43, -140, 0,    57, -50,  0,  63, -50,  0,    65, -54,  -105,
    1,  106,  161, 11, 180,  0,    15, 180,  0,  25, 200,  0,    43, 210,  0,  57, 100,  0,    59, 100,  0,
    63, 100,  0,   65, 106,  161,  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_4haku_e1 = {
    { cKF_ckcb_r_npc_1_4haku_e1_tbl, cKF_ds_npc_1_4haku_e1_tbl, cKF_kn_npc_1_4haku_e1_tbl, cKF_c_npc_1_4haku_e1_tbl, -1,
      65 },
    1.0f,
    65.0f,
    cKF_FRAMECONTROL_REPEAT,
    -3.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
