private void drawLine_plain(int x0, int y0, int dt,
                              int length, boolean vertical) {
    // new "extremely fast" line code
    // adapted from http://www.edepot.com/linee.html
    // first version modified by [toxi]
    // simplified by [rocha]
    // length must be >= 0

    //assert length>=0:length;

    int offset = 0;

    if (vertical) {
      // vertical
      length += y0;
      for (int j = 0x8000 + (x0<<16); y0 <= length; ++y0) {
        offset = y0 * SCREEN_WIDTH + (j>>16);
        m_pixels[offset] = m_stroke;
        if (m_zbuffer != null) m_zbuffer[offset] = m_z0;
        j+=dt;
      }

    } else {
      // horizontal
      length += x0;
      for (int j = 0x8000 + (y0<<16); x0 <= length; ++x0) {
        offset = (j>>16) * SCREEN_WIDTH + x0;
        m_pixels[offset] = m_stroke;
        if (m_zbuffer != null) m_zbuffer[offset] = m_z0;
        j+=dt;
      }
    }
  }