extern Gfx obj_s_kouban_model[];
extern Gfx obj_w_kouban_model[];
extern Gfx obj_s_kouban_window_model[];
extern Gfx obj_w_kouban_window_model[];

static void aPBOX_actor_draw(ACTOR* actor, GAME* game) {
    static Gfx* displayList[] = { obj_s_kouban_model, obj_w_kouban_model };
    static Gfx* mdl[] = { obj_s_kouban_window_model, obj_w_kouban_window_model };

    STRUCTURE_ACTOR* box;
    GRAPH* graph;
    f32 angle;
    int winter;
    int r1;
    int g1;
    int b1;
    int l2;
    int r2;
    int g2;
    int b2;
    u16* pal;
    Gfx* poly_opa;
    Gfx* poly_xlu;

    box = (STRUCTURE_ACTOR*)actor;
    graph = game->graph;
    pal = Common_Get(clip).structure_clip->get_pal_segment_proc(aSTR_PAL_POLICE_BOX);
    winter = box->season == mTM_SEASON_WINTER;

    if (box->action == DEG2SHORT_ANGLE(90.0f) - 1) { // 0x3FFF
        r1 = 255;
        g1 = 255;
        b1 = 150;

        l2 = 120;
        r2 = 255;
        g2 = 255;
        b2 = 150;
    } else if (box->action == DEG2SHORT_ANGLE(0.0f)) {
        r1 = 0;
        g1 = 0;
        b1 = 0;

        l2 = 0;
        r2 = 0;
        g2 = 0;
        b2 = 0;
    } else {
        r2 = 255;
        g2 = 255;
        b2 = 150;

        angle = (1.0f / (DEG2SHORT_ANGLE(90.0f) - 1)) * box->action;
        r1 = angle * 255.0f;
        g1 = angle * 255.0f;
        b1 = angle * 150.0f;
        l2 = angle * 120.0f;
    }

    OPEN_DISP(graph);
    {
        _texture_z_light_fog_prim_npc(graph);

        poly_opa = NOW_POLY_OPA_DISP;

        gSPMatrix(poly_opa++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
        gSPSegment(poly_opa++, G_MWO_SEGMENT_8, pal);
        gDPPipeSync(poly_opa++);
        gDPSetEnvColor(poly_opa++, r1, g1, b1, 0);
        gSPDisplayList(poly_opa++, displayList[winter]);
        SET_POLY_OPA_DISP(poly_opa);
    }
    {
        _texture_z_light_fog_prim_xlu(graph);

        poly_xlu = NOW_POLY_XLU_DISP;

        gDPSetPrimColor(poly_xlu++, 0, l2, r2, g2, b2, 0);
        gSPMatrix(poly_xlu++, _Matrix_to_Mtx_new(graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
        gSPDisplayList(poly_xlu++, mdl[winter]);
        SET_POLY_XLU_DISP(poly_xlu);
    }
    CLOSE_DISP(graph);

    _texture_z_light_fog_prim_shadow(graph);
    (*Common_Get(clip).bg_item_clip->draw_shadow_proc)(game, &aPBOX_shadow_data, FALSE);
}
