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

s16 cKF_kn_npc_1_3haku_e1_tbl[] = { 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 8, 2, 2, 8, 2, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                                    2, 2, 4, 8, 8, 8, 8, 8, 8, 6, 7, 7, 2, 8, 2, 8, 2, 2, 2, 8, 8, 8, 2, 2, 2 };

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

s16 cKF_ds_npc_1_3haku_e1_tbl[] = {
    1,  0,    0, 49, 0,    0,    1,  722,  0,    49, 722,  0,    1,  0,    0,    49, 0,    0,    1,  0,    0,
    49, 0,    0, 1,  62,   19,   21, 80,   0,    44, 60,   0,    49, 62,   19,   1,  50,   0,    49, 50,   0,
    1,  0,    0, 49, 0,    0,    1,  -518, 19,   20, -500, 0,    44, -520, 0,    49, -518, 19,   1,  -100, 0,
    49, -100, 0, 1,  0,    0,    49, 0,    0,    1,  425,  -149, 3,  420,  0,    11, 450,  0,    19, 420,  0,
    27, 450,  0, 35, 420,  0,    43, 450,  0,    49, 425,  -149, 1,  -100, 0,    49, -100, 0,    1,  25,   0,
    49, 25,   0, 1,  139,  711,  3,  165,  0,    11, 60,   0,    19, 165,  0,    27, 60,   0,    35, 165,  0,
    43, 0,    0, 49, 139,  711,  1,  105,  0,    49, 105,  0,    1,  -42,  -210, 3,  -50,  0,    11, 0,    0,
    19, -50,  0, 27, 0,    0,    35, -50,  0,    43, 0,    0,    49, -42,  -210, 1,  -800, 0,    49, -800, 0,
    1,  100,  0, 49, 100,  0,    1,  0,    0,    49, 0,    0,    1,  0,    0,    49, 0,    0,    1,  600,  0,
    49, 600,  0, 1,  0,    0,    49, 0,    0,    1,  0,    0,    49, 0,    0,    1,  0,    0,    49, 0,    0,
    1,  0,    0, 49, 0,    0,    1,  0,    0,    49, 0,    0,    1,  0,    0,    49, 0,    0,    1,  100,  0,
    49, 100,  0, 1,  -196, 34,   21, -160, 0,    44, -200, 0,    49, -196, 34,   1,  -162, 41,   3,  -160, 0,
    11, -170, 0, 19, -160, 0,    27, -170, 0,    35, -160, 0,    43, -170, 0,    49, -162, 41,   1,  0,    0,
    3,  0,    0, 11, -300, 0,    19, -300, 0,    27, -375, 0,    35, -375, 0,    43, 0,    0,    49, 0,    0,
    1,  -480, 0, 3,  -480, 0,    11, -530, 0,    19, -530, 0,    27, -500, 0,    35, -500, 0,    43, -480, 0,
    49, -480, 0, 1,  -400, 0,    3,  -400, 0,    11, -300, 0,    19, -300, 0,    27, -250, 0,    35, -250, 0,
    43, -400, 0, 49, -400, 0,    1,  -300, 0,    3,  -300, 0,    11, -170, 0,    19, -170, 0,    27, -280, 0,
    35, -280, 0, 43, -300, 0,    49, -300, 0,    1,  -480, 0,    3,  -480, 0,    11, -230, 0,    19, -230, 0,
    27, -290, 0, 35, -290, 0,    43, -480, 0,    49, -480, 0,    1,  0,    0,    3,  0,    0,    11, -200, 0,
    35, -200, 0, 43, 0,    0,    49, 0,    0,    1,  -260, 0,    9,  -40,  0,    17, -190, 0,    25, -40,  0,
    33, -190, 0, 41, 151,  0,    49, -260, 0,    1,  -130, 0,    9,  -80,  0,    17, -120, 0,    25, -80,  0,
    33, -120, 0, 41, -50,  0,    49, -130, 0,    1,  -250, 0,    49, -250, 0,    1,  -94,  -956, 3,  -130, 0,
    11, 70,   0, 19, -80,  0,    27, 70,   0,    35, -80,  0,    43, 100,  0,    49, -94,  -956, 1,  -600, 0,
    49, -600, 0, 1,  -143, -725, 3,  -170, 0,    11, -30,  0,    19, -100, 0,    27, -30,  0,    35, -100, 0,
    43, 0,    0, 49, -143, -725, 1,  0,    0,    49, 0,    0,    1,  0,    0,    49, 0,    0,    1,  0,    0,
    49, 0,    0, 1,  -2,   -63,  11, 30,   0,    15, 30,   0,    25, 120,  101,  31, 120,  -99,  43, 0,    0,
    47, 0,    0, 49, -2,   -63,  1,  -54,  -105, 11, -100, 0,    15, -100, 0,    25, -140, 0,    29, -140, 0,
    43, -50,  0, 47, -50,  0,    49, -54,  -105, 1,  106,  161,  11, 180,  0,    15, 180,  0,    25, 200,  0,
    29, 200,  0, 43, 100,  0,    47, 100,  0,    49, 106,  161,  1,  0,    0,    49, 0,    0,    1,  0,    0,
    49, 0,    0, 1,  0,    0,    49, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_3haku_e1 = {
    { cKF_ckcb_r_npc_1_3haku_e1_tbl, cKF_ds_npc_1_3haku_e1_tbl, cKF_kn_npc_1_3haku_e1_tbl, cKF_c_npc_1_3haku_e1_tbl, -1,
      49 },
    1.0f,
    49.0f,
    cKF_FRAMECONTROL_REPEAT,
    -3.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    NULL,
};
