
void aFLEW_actor_draw(ACTOR* actor, GAME* game) {
    static const xyz_t base_vec_z = {0.0f, 0.0f, 1.0f};
    static MtxF flip_mtx = {{
        {-1.0f, 0.0f, 0.0f, 0.0f},
        {0.0f, 1.0f, 0.0f, 0.0f},
        {0.0f, 0.0f, 1.0f, 0.0f},
        {0.0f, 0.0f, 0.0f, 1.0f},
    }};
    GAME_PLAY* play = (GAME_PLAY*)game;

    GRAPH* graph = game->graph;
    xyz_t bboard;
    int isWest;
    xyz_t l;
    f32 vecLen;
    s16 angle;
    Gfx* gfx;
    int a;

    isWest = actor->npc_id == WATERFALL_WEST;

    _texture_z_light_fog_prim_xlu(graph);

    if (isWest != FALSE) {
        Matrix_mult(&flip_mtx, TRUE);
    }

    OPEN_DISP(graph);

    {
        Gfx* gfx;
        gfx = NOW_POLY_XLU_DISP;
        gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

        NOW_POLY_XLU_DISP = gfx;
    }
    Evw_Anime_Set(play, &obj_fallSE_evw_anime);

    gfx = NOW_POLY_XLU_DISP;
    gSPDisplayList(gfx++, obj_fallSESW_model);

    if (Common_Get(rainbow_opacity) > 0.0f) {
        a = (256.0f * Common_Get(rainbow_opacity));

        if (a > 255) {
            a = 255;
        }
        bboard.x = play->billboard_matrix.mf[2][0];
        bboard.y = play->billboard_matrix.mf[2][1];
        bboard.z = play->billboard_matrix.mf[2][2];

        if (isWest != FALSE) {
            bboard.x *= -1.0f;
        }

        Math3DVectorProduct2Vec(&base_vec_z, &bboard, &l);

        vecLen = Math3DVecLength(&l);

        if (vecLen >= 0.0000001f) {
            xyz_t_mult_v(&l, 1.0f / vecLen);
            angle =
                RAD2SHORTANGLE(facos(base_vec_z.z * bboard.z + ((base_vec_z.x * bboard.x) + base_vec_z.y * bboard.y)));

            Matrix_translate(actor->world.position.x, actor->world.position.y, actor->world.position.z, FALSE);
            if (actor->npc_id == WATERFALL_WEST) {
                Matrix_mult(&flip_mtx, TRUE);
            }
            Matrix_RotateVector(angle, &l, TRUE);
            Matrix_RotateY(-0x2000, TRUE);
            Matrix_scale(actor->scale.x, actor->scale.y, actor->scale.z, TRUE);

            gSPMatrix(gfx++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
            gDPSetRenderMode(gfx++, G_RM_FOG_SHADE_A, G_RM_XLU_SURF2);
            gDPSetEnvColor(gfx++, 255, 255, 255, a);
            gSPLoadGeometryMode(gfx++, G_SHADE | G_FOG | G_SHADING_SMOOTH);
            gSPDisplayList(gfx++, obj_fallSE_rainbowT_model);
        }
    }

    NOW_POLY_XLU_DISP = gfx;
    CLOSE_DISP(graph);
}