#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_wipwait1_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_wipwait1_tbl[] = { 3, 6, 6, 3, 4, 3, 3, 6, 6, 3, 6, 3, 3, 6, 3, 3, 6, 6, 3, 6, 3, 3, 6, 3, 3, 3, 3,
                                    3, 3, 3, 3, 5, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 6, 5, 3, 3, 3 };

s16 cKF_c_npc_1_wipwait1_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_wipwait1_tbl[] = {
    1,  0,    0,  2,  0,    0,   65, 0,    0,    1,  706,  0,    2,  707,  28,   17, 756,  0,   33, 706,  0,
    49, 756,  0,  65, 706,  0,   1,  0,    0,    2,  1,    37,   17, 60,   0,    33, 40,   0,   49, 60,   0,
    65, 0,    0,  1,  0,    0,   2,  0,    0,    65, 0,    0,    1,  0,    0,    2,  0,    -8,  33, -40,  0,
    65, 0,    0,  1,  0,    0,   2,  0,    0,    65, 0,    0,    1,  -175, -313, 2,  -177, 0,   65, -175, 0,
    1,  -100, 0,  2,  -99,  40,  17, 0,    0,    33, -135, 0,    49, 0,    0,    65, -100, 0,   1,  25,   0,
    2,  25,   -5, 17, 0,    0,   33, 25,   0,    49, 0,    0,    65, 25,   0,    1,  0,    0,   2,  0,    0,
    65, 0,    0,  1,  200,  0,   2,  198,  -109, 17, 0,    0,    33, 245,  0,    49, 0,    0,   65, 200,  0,
    1,  0,    0,  2,  0,    0,   65, 0,    0,    1,  0,    0,    2,  0,    0,    65, 0,    0,   1,  -100, 0,
    2,  -98,  48, 17, 50,   0,   33, -145, 0,    49, 50,   0,    65, -100, 0,    1,  0,    0,   2,  0,    0,
    65, 0,    0,  1,  175,  313, 2,  177,  0,    65, 175,  0,    1,  -215, 0,    2,  -214, 103, 17, -115, 0,
    33, -250, 0,  49, -115, 0,   65, -215, 0,    1,  -25,  0,    2,  -25,  19,   17, 0,    0,   33, -25,  0,
    49, 0,    0,  65, -25,  0,   1,  0,    0,    2,  0,    0,    65, 0,    0,    1,  65,   0,   2,  63,   -129,
    17, -135, 0,  33, 110,  0,   49, -135, 0,    65, 65,   0,    1,  0,    0,    2,  0,    0,   65, 0,    0,
    1,  0,    0,  2,  0,    0,   65, 0,    0,    1,  -100, 0,    2,  -98,  58,   17, 50,   0,   33, -145, 0,
    49, 50,   0,  65, -100, 0,   1,  0,    0,    2,  0,    0,    65, 0,    0,    1,  0,    0,   2,  0,    0,
    65, 0,    0,  1,  60,   0,   2,  60,   0,    65, 60,   0,    1,  0,    0,    2,  0,    0,   65, 0,    0,
    1,  0,    0,  2,  0,    0,   65, 0,    0,    1,  82,   0,    2,  82,   0,    65, 82,   0,   1,  0,    0,
    2,  0,    0,  65, 0,    0,   1,  0,    0,    2,  0,    0,    65, 0,    0,    1,  68,   -74, 2,  66,   -27,
    3,  66,   0,  35, 166,  0,   65, 68,   -78,  1,  -71,  0,    2,  -71,  0,    65, -71,  0,   1,  -2,   0,
    2,  -2,   0,  35, -1,   0,   65, -2,   0,    1,  -395, 0,    2,  -395, 14,   35, -338, 0,   65, -395, 0,
    1,  -799, 0,  2,  -799, 0,   35, -799, 0,    65, -799, 0,    1,  12,   0,    2,  12,   0,   35, 13,   0,
    65, 12,   0,  1,  -4,   0,   2,  -4,   0,    35, -3,   0,    65, -4,   0,    1,  -300, 0,   2,  -300, -8,
    35, -346, 0,  65, -300, 0,   1,  -331, 0,    2,  -331, 6,    35, -297, 0,    65, -331, 0,   1,  -556, 0,
    2,  -555, 10, 35, -504, 0,   65, -556, 0,    1,  970,  0,    2,  970,  -7,   35, 929,  0,   65, 970,  0,
    1,  0,    0,  2,  0,    0,   35, 0,    0,    65, 0,    0,    1,  0,    0,    2,  0,    0,   35, 0,    0,
    65, 0,    0,  1,  97,   -1,  2,  97,   9,    35, 137,  0,    65, 97,   0,    1,  0,    0,   2,  0,    0,
    65, 0,    0,  1,  0,    0,   2,  0,    0,    65, 0,    0,    1,  0,    0,    2,  0,    0,   65, 0,    0,
    1,  -498, 0,  2,  -498, 0,   65, -498, 0,    1,  -185, 0,    2,  -185, 34,   17, -135, 0,   33, -185, 0,
    49, -135, 0,  65, -185, 0,   1,  60,   -263, 2,  52,   -216, 17, 10,   0,    49, 110,  0,   65, 60,   -273,
    1,  0,    0,  2,  0,    0,   65, 0,    0,    1,  0,    0,    2,  0,    0,    65, 0,    0,   1,  0,    0,
    2,  0,    0,  65, 0,    0
};

aNPC_Animation_c cKF_ba_r_npc_1_wipwait1 = {
    { cKF_ckcb_r_npc_1_wipwait1_tbl, cKF_ds_npc_1_wipwait1_tbl, cKF_kn_npc_1_wipwait1_tbl, cKF_c_npc_1_wipwait1_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,
};
