#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_wipkogu1_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_wipkogu1_tbl[] = { 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 5, 5, 2, 2, 2, 7, 7, 7, 5, 5, 5, 2, 2, 2, 2, 2, 2,
                                    2, 2, 2, 6, 6, 6, 5, 5, 5, 5, 5, 5, 9, 9, 9, 7, 7, 7, 2, 2, 2, 8, 6, 8, 2, 2, 2 };

s16 cKF_c_npc_1_wipkogu1_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_wipkogu1_tbl[] = {
    1,  0,    0,     21, 0,    0,     41, 0,    0,    61, 0,    0,    81, 0,    0,    1,  700,  0,    21, 700,  0,
    41, 700,  0,     61, 700,  0,     81, 700,  0,    1,  0,    214,  21, 200,  256,  41, 200,  -236, 61, 0,    -195,
    81, 0,    225,   1,  50,   133,   21, 150,  107,  41, 150,  -121, 61, 50,   -117, 81, 50,   120,  1,  6,    -102,
    21, -100, -122,  41, -100, 135,   61, 6,    118,  81, 6,    -99,  1,  0,    0,    2,  0,    0,    21, 0,    0,
    41, 0,    0,     61, 0,    0,     81, 0,    0,    1,  0,    0,    21, -2,   0,    41, -2,   0,    61, 0,    0,
    81, 0,    0,     1,  -150, 0,     21, 60,   0,    41, 60,   0,    61, -150, 2,    81, -150, 0,    1,  40,   0,
    21, 58,   0,     41, 58,   0,     61, 40,   0,    81, 40,   0,    1,  0,    0,    2,  0,    0,    21, 0,    0,
    41, 0,    0,     61, 0,    0,     81, 0,    0,    1,  332,  2,    21, 0,    -2,   41, 0,    1,    61, 332,  -3,
    81, 332,  -2,    1,  0,    3,     21, 0,    0,    41, 0,    0,    61, 0,    0,    81, 0,    0,    1,  0,    0,
    81, 0,    0,     1,  0,    0,     81, 0,    0,    1,  0,    0,    81, 0,    0,    1,  0,    0,    11, 0,    0,
    21, 0,    0,     41, 0,    0,     51, 0,    0,    61, 0,    0,    81, 0,    0,    1,  -227, -211, 11, -380, -142,
    21, -400, -22,   41, -400, 13,    51, -380, 146,  61, -227, 221,  81, -227, -237, 1,  0,    0,    11, 0,    0,
    21, 0,    0,     41, 0,    0,     51, 0,    0,    61, 0,    0,    81, 0,    0,    1,  0,    0,    21, 0,    0,
    41, 0,    0,     61, 0,    0,     81, 0,    0,    1,  0,    63,   21, 200,  57,   41, 200,  -65,  61, 0,    -56,
    81, 0,    52,    1,  0,    0,     21, 0,    0,    41, 0,    0,    61, 0,    0,    81, 0,    0,    1,  0,    0,
    81, 0,    0,     1,  0,    0,     81, 0,    0,    1,  0,    0,    81, 0,    0,    1,  0,    0,    81, 0,    0,
    1,  0,    0,     81, 0,    0,     1,  0,    0,    81, 0,    0,    1,  0,    0,    81, 0,    0,    1,  0,    0,
    81, 0,    0,     1,  0,    0,     81, 0,    0,    1,  45,   21,   5,  48,   31,   25, 98,   33,   45, 98,   -38,
    65, 48,   -33,   81, 45,   18,    1,  82,   -88,  5,  66,   -149, 25, -180, -152, 45, -180, 162,  65, 66,   148,
    81, 82,   -88,   1,  -68,  0,     5,  -68,  0,    25, -68,  0,    45, -68,  0,    65, -68,  0,    81, -68,  0,
    1,  -2,   -3,    21, -5,   -3,    41, -5,   3,    61, -2,   3,    81, -2,   0,    1,  -395, -279, 21, -767, -279,
    41, -767, 279,   61, -395, 279,   81, -395, -258, 1,  -799, 3,    21, -795, 3,    41, -795, -3,   61, -799, -3,
    81, -799, 0,     1,  12,   71,    21, 107,  71,   41, 107,  -71,  61, 12,   -71,  81, 12,   0,    1,  -4,   -1,
    21, -5,   -1,    41, -5,   1,     61, -4,   1,    81, -4,   0,    1,  -300, -96,  21, -428, -96,  41, -428, 96,
    61, -300, 96,    81, -300, 0,     1,  -331, 540,  9,  6,    2304, 16, 552,  2597, 26, 1156, 739,  36, 1156, -834,
    46, 552,  -2388, 53, 6,    -1766, 61, -331, -474, 81, -331, 273,  1,  -556, -173, 11, -729, -451, 16, -781, -170,
    21, -798, -23,   41, -798, 29,    46, -781, 156,  51, -729, 451,  61, -556, 173,  81, -556, -143, 1,  970,  -417,
    9,  752,  -1821, 16, 220,  -2146, 26, -381, -901, 36, -381, 924,  46, 220,  2179, 53, 752,  1448, 61, 970,  382,
    81, 970,  0,     1,  0,    0,     11, 0,    0,    21, 0,    0,    41, 0,    0,    51, 0,    0,    61, 0,    0,
    81, 0,    0,     1,  0,    0,     11, 0,    0,    21, 0,    0,    41, 0,    0,    51, 0,    0,    61, 0,    0,
    81, 0,    0,     1,  97,   224,   11, 188,  186,  21, 221,  33,   41, 221,  -33,  51, 188,  -186, 61, 97,   -223,
    81, 97,   200,   1,  0,    0,     81, 0,    0,    1,  0,    0,    81, 0,    0,    1,  0,    0,    81, 0,    0,
    1,  0,    0,     9,  0,    0,     10, 0,    0,    29, 0,    0,    49, 0,    0,    67, 0,    0,    69, 0,    0,
    81, 0,    0,     1,  -155, 43,    9,  -112, 250,  29, 220,  260,  49, 220,  -250, 69, -112, -254, 81, -155, 30,
    1,  0,    0,     9,  0,    0,     10, 0,    0,    29, 0,    0,    49, 0,    0,    67, 0,    0,    69, 0,    0,
    81, 0,    0,     1,  0,    0,     81, 0,    0,    1,  0,    0,    81, 0,    0,    1,  0,    0,    81, 0,    0
};

int push_se_chk_pat[] = { 1 };

int pull_se_chk_pat[] = { 36 };

static aNPC_other_se_data_c other_se_dt[] = { { { ARRAY_COUNT(push_se_chk_pat), push_se_chk_pat }, 1123 },
                                              { { ARRAY_COUNT(pull_se_chk_pat), pull_se_chk_pat }, 1122 } };

static aNPC_se_data_table_c se_dt_tbl[] = { { NULL, NULL, 2, other_se_dt } };

aNPC_Animation_c cKF_ba_r_npc_1_wipkogu1 = {
    { cKF_ckcb_r_npc_1_wipkogu1_tbl, cKF_ds_npc_1_wipkogu1_tbl, cKF_kn_npc_1_wipkogu1_tbl, cKF_c_npc_1_wipkogu1_tbl, -1,
      81 },
    1.0f,
    81.0f,
    cKF_FRAMECONTROL_REPEAT,
    -5.0f,
    NULL,
    aNPC_EYE_TEX1,
    -1,
    NULL,
    aNPC_MOUTH_TEX0,
    0,
    -1,
    -1,
    NULL,
    se_dt_tbl,
};
