void drawObject (Graphics g, JGObject o) {
        if (!o.is_suspended) {
            // o.prepareForFrame();
            drawImage(g, (int) o.x, (int) o.y, o.getImageName(), true,o.alpha);
            try {
                o.paint();
            }
            catch (JGameError ex) {
                exitEngine(dbgExceptionToString(ex));
            }
            catch (Exception e) {
                dbgShowException(o.getName(), e);
            }
        }
        // note that the debug bbox of suspended objects will be visible
        if ((debugflags & JGEngine.BBOX_DEBUG) != 0) {
            setColor(g, el.fg_color);
            JGRectangle bbox = o.getBBox();
            if (bbox != null) { // bounding box defined
                // bbox.x -= xofs;
                // bbox.y -= yofs;
                bbox = el.scalePos(bbox, true);
                g.drawRect(bbox.x, bbox.y, bbox.width, bbox.height);
            }
            bbox = o.getTileBBox();
            if (bbox != null) { // tile bounding box defined
                // bbox.x -= xofs;
                // bbox.y -= yofs;
                bbox = el.scalePos(bbox, true);
                g.drawRect(bbox.x, bbox.y, bbox.width, bbox.height);
                setColor(g, debug_auxcolor1);
                bbox = o.getTileBBox();
                bbox = getTiles(bbox);
                bbox.x *= el.tilex;
                bbox.y *= el.tiley;
                // bbox.x -= xofs;
                // bbox.y -= yofs;
                bbox.width *= el.tilex;
                bbox.height *= el.tiley;
                bbox = el.scalePos(bbox, true);
                g.drawRect(bbox.x, bbox.y, bbox.width, bbox.height);
                setColor(g, debug_auxcolor2);
                bbox = o.getCenterTiles();
                bbox.x *= el.tilex;
                bbox.y *= el.tiley;
                // bbox.x -= xofs;
                // bbox.y -= yofs;
                bbox.width *= el.tilex;
                bbox.height *= el.tiley;
                bbox = el.scalePos(bbox, true);
                g.drawRect(bbox.x + 2, bbox.y + 2, bbox.width - 4, bbox.height - 4);
            }
        }
        // o.frameFinished();
    }