#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_wipwait2_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_wipwait2_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, 2, 4, 4, 2, 4, 2, 2, 4, 4, 2, 4, 2, 2, 2, 2, 3, 6, 5, 3, 3, 3 };

s16 cKF_c_npc_1_wipwait2_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_wipwait2_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,  -99,  0,    2,  -98,  103,  17, 1,    0,
    33, -134, 0,   49, 1,    0,    65, -99,  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,  199,  0,    2,  197,  -129,
    17, -1,   0,   33, 244,  0,    49, -1,   0,    65, 199,  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,  0,    0,  2,  0,    0,    65, 0,    0,    1,  0,    0,
    65, 0,    0,   1,  58,   226,  9,  80,   0,    41, -80,  0,  65, 58,   233,  1,  -564, 126,  9,  -550, 0,
    41, -650, 0,   65, -564, 153,  1,  0,    0,    65, 0,    0,  1,  -57,  354,  13, 0,    0,    45, -180, 0,
    65, -57,  381, 1,  0,    0,    65, 0,    0,    1,  0,    0,  65, 0,    0,    1,  58,   217,  9,  80,   0,
    41, -80,  0,   65, 58,   230,  1,  564,  -143, 9,  550,  0,  41, 650,  0,    65, 564,  -169, 1,  0,    0,
    65, 0,    0,   1,  -57,  354,  13, 0,    0,    45, -180, 0,  65, -57,  372,  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,
    2,  0,    0,   65, 0,    0,    1,  -22,  0,    2,  -22,  34, 17, 28,   0,    33, -22,  0,    49, 28,   0,
    65, -22,  0,   1,  0,    -263, 2,  -9,   -216, 17, -50,  0,  49, 50,   0,    65, 0,    -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_wipwait2 = {
    { cKF_ckcb_r_npc_1_wipwait2_tbl, cKF_ds_npc_1_wipwait2_tbl, cKF_kn_npc_1_wipwait2_tbl, cKF_c_npc_1_wipwait2_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,
};
