
static int aBRS_actor_draw_before(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag,
                                  void* arg, s_xyz* joint1, xyz_t* trans) {
    STRUCTURE_ACTOR* actor = (STRUCTURE_ACTOR*)arg;
    GRAPH* graph = game->graph;
    f32 shop_color;
    Gfx* gfx;

    if (jointNum == 1) {
        OPEN_DISP(graph);
        shop_color = actor->arg0_f;
        gfx = NOW_POLY_OPA_DISP;

        gDPSetPrimColor(gfx++, 0, 0, (int)(0.5f + (255.0f * shop_color)), (int)(0.5f + (255.0f * shop_color)),
                        (int)(0.5f + (150.0f * shop_color)), 255);

        SET_POLY_OPA_DISP(gfx);
        CLOSE_DISP(graph);
    } else if (jointNum == 5) {
        *joint = NULL;
    }

    return 1;
}

static int aBRS_actor_draw_after(GAME* game, cKF_SkeletonInfo_R_c* keyf, int jointNum, Gfx** joint, u8* jointFlag,
                                 void* arg, s_xyz* joint1, xyz_t* trans) {
    static Gfx* mdl[] = {
        obj_s_yamishop_window_model,
        obj_w_yamishop_window_model,
    };

    STRUCTURE_ACTOR* actor = (STRUCTURE_ACTOR*)arg;
    GRAPH* graph = game->graph;
    Mtx* mtx;
    int isWinter;
    int l;
    int r;
    int g;
    int b;
    Gfx* gfx;

    if (jointNum == 5) {
        mtx = _Matrix_to_Mtx_new(graph);

        if (mtx != NULL) {
            if (actor->arg0_f > 0.0f) {
                r = 255;
                g = 255;
                b = 150;
                l = (0.5f + (120.0f * actor->arg0_f));
            } else {
                l = 0;
                r = 0;
                g = 0;
                b = 0;
            }

            isWinter = actor->season == mTM_SEASON_WINTER;
            _texture_z_light_fog_prim_shadow(graph);

            OPEN_DISP(graph);
            gfx = NOW_SHADOW_DISP;

            gDPSetPrimColor(gfx++, 0, l, r, g, b, 0);
            gSPMatrix(gfx++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

            gSPDisplayList(gfx++, mdl[isWinter]);

            SET_SHADOW_DISP(gfx);
            CLOSE_DISP(graph);
        }
    }

    return 1;
}

static void aBRS_actor_draw(ACTOR* actor, GAME* game) {
    STRUCTURE_ACTOR* structure = (STRUCTURE_ACTOR*)actor;
    GRAPH* graph = game->graph;
    cKF_SkeletonInfo_R_c* keyframe = &structure->keyframe;
    Mtx* mtx;
    Gfx* gfx;

    mtx = GRAPH_ALLOC_TYPE(graph, Mtx, (u32)keyframe->skeleton->num_shown_joints);

    if (mtx != NULL) {
        u16* pal;

        pal = Common_Get(clip).structure_clip->get_pal_segment_proc(aSTR_PAL_BR_SHOP);

        _texture_z_light_fog_prim(graph);

        OPEN_DISP(graph);
        gfx = NOW_POLY_OPA_DISP;

        gSPSegment(gfx++, 8, pal);

        SET_POLY_OPA_DISP(gfx);
        CLOSE_DISP(graph);

        cKF_Si3_draw_R_SV(game, keyframe, mtx, &aBRS_actor_draw_before, &aBRS_actor_draw_after, actor);
        (*Common_Get(clip).bg_item_clip->draw_shadow_proc)(game, &aBRS_shadow_data, FALSE);
    }
}
