亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xgeneral.c

?? 一個占星術算命游戲
?? C
?? 第 1 頁 / 共 3 頁
字號:
  xabs = abs(x2 - x1);
  yabs = abs(y2 - y1);

  /* Technically what we're doing here is drawing a line which is more    */
  /* horizontal then vertical. We always increment x by 1, and increment  */
  /* y whenever a fractional variable passes a certain amount. For lines  */
  /* that are more vertical than horizontal, we just swap x and y coords. */

  if (xabs < yabs) {
    SWAP(xadd, yadd);
    SWAP(xabs, yabs);
  }
  yinc = (xabs >> 1) - ((xabs & 1 ^ 1) && xadd > 2);
  for (i = xabs+1; i; i--) {
    if (j < 1)
      DrawPoint(x, y);
    j = j < skip ? j+1 : 0;
    switch (xadd) {
    case 1: x++; break;
    case 2: y++; break;
    case 3: x--; break;
    case 4: y--; break;
    }
    yinc += yabs;
    if (yinc - xabs >= 0) {
      yinc -= xabs;
      switch (yadd) {
      case 1: x++; break;
      case 2: y++; break;
      case 3: x--; break;
      case 4: y--; break;
      }
    }
  }
}


/* Draw a normal line on the screen; however, if the x coordinates are close */
/* to either of the two given bounds, then we assume that the line runs off  */
/* one side and reappears on the other, so draw the appropriate two lines    */
/* instead. This is used by the Ley line and astro-graph routines, which     */
/* draw lines running around the world and hence off the edges of the maps.  */

void DrawWrap(x1, y1, x2, y2, xmin, xmax)
int x1, y1, x2, y2;
{
  int xmid, ymid, i;

  if (x1 < 0) {           /* Special case for drawing world map. */
    DrawPoint(x2, y2);
    return;
  }
  xmid = (xmax-xmin) / 2;

  /* If endpoints aren't near opposite edges, just draw the line and return. */

  if (abs(x2-x1) < xmid) {
    DrawLine(x1, y1, x2, y2);
    return;
  }
  i = (xmax-xmin+1) + (x1 < xmid ? x1-x2 : x2-x1);

  /* Determine vertical coordinate where our line runs off edges of screen. */

  ymid = y1+(int)((real)(y2-y1)*
    (x1 < xmid ? (real)(x1-xmin) : (real)(xmax-x1))/(real)i + ROUND);
  DrawLine(x1, y1, x1 < xmid ? xmin : xmax, ymid);
  DrawLine(x2 < xmid ? xmin : xmax, ymid, x2, y2);
}


/* This routine, and its companion below, clips a line defined by its  */
/* endpoints to either above some line y=c, or below some line y=c. By */
/* passing in parameters in different orders, we can clip to vertical  */
/* lines, too. These are used by the DrawClip() routine below.         */

void ClipLesser(x1, y1, x2, y2, s)
int *x1, *y1, *x2, *y2, s;
{
  *x1 -= (int)((long)(*y1-s)*(*x2-*x1)/(*y2-*y1));
  *y1 = s;
}

void ClipGreater(x1, y1, x2, y2, s)
int *x1, *y1, *x2, *y2, s;
{
  *x1 += (int)((long)(s-*y1)*(*x2-*x1)/(*y2-*y1));
  *y1 = s;
}


/* Draw a line on the screen. This is just like DrawLine() routine earlier; */
/* however, first clip the endpoints to the window viewport before drawing. */

void DrawClip(x1, y1, x2, y2, xl, yl, xh, yh, skip)
int x1, y1, x2, y2, xl, yl, xh, yh, skip;
{
  if (x1 < xl)
    ClipLesser (&y1, &x1, &y2, &x2, xl);    /* Check left side of window. */
  if (x2 < xl)
    ClipLesser (&y2, &x2, &y1, &x1, xl);
  if (y1 < yl)
    ClipLesser (&x1, &y1, &x2, &y2, yl);    /* Check top side of window.  */
  if (y2 < yl)
    ClipLesser (&x2, &y2, &x1, &y1, yl);
  if (x1 > xh)
    ClipGreater(&y1, &x1, &y2, &x2, xh);    /* Check right of window.  */
  if (x2 > xh)
    ClipGreater(&y2, &x2, &y1, &x1, xh);
  if (y1 > yh)
    ClipGreater(&x1, &y1, &x2, &y2, yh);    /* Check bottom of window. */
  if (y2 > yh)
    ClipGreater(&x2, &y2, &x1, &y1, yh);
  DrawDash(x1, y1, x2, y2, skip);           /* Go draw the line.       */
}


/* Draw a circle or ellipse inside the given bounding rectangle. */

void DrawEllipse(x1, y1, x2, y2)
int x1, y1, x2, y2;
{
  int x, y, rx, ry, m, n, u, v, i;

  if (xfile) {
    x = (x1+x2)/2; y = (y1+y2)/2; rx = (x2-x1)/2; ry = (y2-y1)/2;
    if (xbitmap) {
      InitCircle();
      m = x + rx; n = y;
      for (i = 0; i <= DEGR; i += DEGINC) {
        u = x + (int)((real)rx*circ->x[i]); v = y + (int)((real)ry*circ->y[i]);
        u = MIN(u, x + rx-1); v = MIN(v, y + ry-1);
        DrawLine(m, n, u, v);
        m = u; n = v;
      }
    }
#ifdef PS
    else if (psfile) {
      PSlinecap(FALSE);
      PSforcestroke();
      fprintf(psdata, "%d %d %d %d el\n", rx, ry, x, y);
    }
#endif
#ifdef META
    else {
      metafilldes = 16;    /* Specify a hollow fill brush. */
      MetaSelect();
      MetaEllipse(x1+metawid/3, y1+metawid/3, x2+metawid/3, y2+metawid/3);
    }
#endif
  }
#ifdef X11
  else
    XDrawArc(disp, pixmap, gc, x1, y1, x2-x1, y2-y1, 0, 360*64);
#endif
#ifdef MSG
  else
    _ellipse(_GBORDER, offsetx + x1, offsety + y1, offsetx + x2, offsety + y2);
#endif
}


/* Print a string of text on the graphic window at specified location. To  */
/* do this we either use Astrolog's own "font" (6x10) and draw each letter */
/* separately, or else specify system fonts for PostScript and metafiles.  */

void DrawText(string, x, y, base)
char *string;
int x, y, base;
{
  int s = scale, c = colcur, len;

  len = StringLen(string);
  scale = 100 * scalet;
  x += SCALE;
  if (base >= FALSE)
    x -= len*FONTX*SCALE/2;
  if (!base)
    y -= FONTY*SCALE/2;
  else
    y -= (FONTY-3)*SCALE;
  DrawColor(off);
  DrawBlock(x, y, x+FONTX*SCALE*len, y+(FONTY-1)*SCALE);
  DrawColor(c);
#ifdef PS
  if (psfile && xfont) {
    PSfont(4);
    fprintf(psdata, "%d %d(%s)center\n",
      x + FONTX*SCALE*len/2, y + FONTY*SCALE/2, string);
    scale = s;
    return;
  }
#endif
  while (*string) {
#ifdef META
    if (metafile && xfont) {
      metafontdes = 3;
      metatxtcdes = colcur;
      metatxtades = 0x6 | 0 /* Center | Top */;
      MetaSelect();
      MetaTextOut(x, y, 1);
      MetaWord(MAKEWORD(*string, 0));
    } else
#endif
      DrawTurtle(asciidraw[*string-' '], x, y);
    x += FONTX*SCALE;
    string++;
  }
  scale = s;
}


/* Draw the glyph of a sign at particular coordinates on the screen.    */
/* To do this we either use Astrolog's turtle vector representation or  */
/* we may specify a system font character for PostScript and metafiles. */

void DrawSign(i, x, y)
int i, x, y;
{
#ifdef PS
  if (psfile && xfont) {
    PSfont(1);
    fprintf(psdata, "%d %d(%c)center\n", x, y, 'A' + i - 1);
    return;
  }
#endif
#ifdef META
  if (metafile && xfont) {
    metafontdes = 1;
    metatxtcdes = colcur;
    metatxtades = 0x6 | 0x8 /* Center | Bottom */;
    MetaSelect();
    MetaTextOut(x, y+4*SCALE, 1);
    MetaWord(MAKEWORD('^' + i - 1, 0));
    return;
  }
#endif
  DrawTurtle(signdraw[i], x, y);
}


/* Draw the number of a house at particular coordinates on the screen. */
/* We either use a turtle vector or write a number in a system font.   */

void DrawHouse(i, x, y)
int i, x, y;
{
#ifdef PS
  if (psfile && xfont) {
    PSfont(3);
	  fprintf(psdata, "%d %d(%d)center\n", x, y, i);
    return;
  }
#endif
#ifdef META
  if (metafile && xfont) {
    metafontdes = 2;
    metatxtcdes = colcur;
    metatxtades = 0x6 | 0x8 /* Center | Bottom */;
    MetaSelect();
    MetaTextOut(x, y+3*SCALE, 1 + (i>9));
    MetaWord(MAKEWORD(i > 9 ? '1' : '0'+i, i > 9 ? '0'+i-10 : 0));
    return;
  }
#endif
  DrawTurtle(housedraw[i], x, y);
}


/* Draw the glyph of an object at particular coordinates on the screen. */

void DrawObject(i, x, y)
int i, x, y;
{
  char glyph[4];
#ifdef PS
  static char objectchar[] = "dQRSTUVWXYZ     < ba ";
#endif
#ifdef META
  char c = 0;
#endif

  if (!xlabel)    /* If we are inhibiting labels, then do nothing. */
    return;

  /* For other planet centered charts, we have to remember that that     */
  /* particular planet's index now represents the Earth. If we are given */
  /* that index to draw, then change it so we draw the Earth instead.    */

  if (modex != MODES &&
    ((i == centerplanet && i > _MOO) || (centerplanet == 0 && i == _SUN)))
    i = 0;
  DrawColor(objectcolor[i]);
  if (i <= BASE) {
#ifdef PS
    if (psfile && xfont == 1 && objectchar[i] != ' ') {
      PSfont(2);
      fprintf(psdata, "%d %d(%c)center\n", x, y, objectchar[i]);
      return;
    }
#endif
#ifdef META
    if (metafile && xfont == 1) {
      if (i < _SUN)
        c = ';';
      else if (i <= _PLU) c = 'Q' + i - 1;
      else if (i == _NOD) c = '<';
      else if (i == _MC)  c = 'b';
      else if (i == _ASC) c = 'a';
    }
    if (c) {
      metafontdes = 4;
      metatxtcdes = colcur;
      metatxtades = 0x6 | 0x8 /* Center | Bottom */;
      MetaSelect();
      MetaTextOut(x, y+5*SCALE, 1);
      MetaWord(MAKEWORD(c, 0));
      return;
    }
#endif
    DrawTurtle(objectdraw[i], x, y);

  /* Normally we can just go draw the glyph; however, stars don't have */
  /* glyphs, so for these draw their three letter abbreviation.        */

  } else {
    sprintf(glyph, "%c%c%c", OBJNAM(i));
    DrawText(glyph, x, y, FALSE);
  }
}


/* Draw the glyph of an aspect at particular coordinates on the screen. */
/* Again we either use Astrolog's turtle vector or a system Astro font. */

void DrawAspect(i, x, y)
int i, x, y;
{
#ifdef PS
  static char aspectchar[] = "!\"#$'&%()+-       ";
#endif
#ifdef META
  char c = 0;
#endif

#ifdef PS
  if (psfile && xfont == 1 && aspectchar[i-1] != ' ') {
    PSfont(2);
    fprintf(psdata, "%d %d(%c)center\n", x, y, aspectchar[i-1]);
    return;
  }
#endif
#ifdef META
  if (metafile && xfont == 1) {
    if (i <= _TRI)
      c = '!' + i - 1;
    else if (i == _SEX) c = '\'';
    else if (i == _INC) c = '&';
    else if (i == _SSX) c = '%';
    else if (i == _SSQ) c = '(';
    else if (i == _SES) c = ')';
    else if (i == _QUI) c = '+';
    else if (i == _BQN) c = '-';
  }
  if (c) {
    metafontdes = 4;
    metatxtcdes = colcur;
    metatxtades = 0x6 | 0x8 /* Center | Bottom */;
    MetaSelect();
    MetaTextOut(x, y+5*SCALE, 1);
    MetaWord(MAKEWORD(c, 0));
    return;
  }
#endif
  DrawTurtle(aspectdraw[i], x, y);
}


/* Convert a string segment to a positive number, updating the string to  */
/* point beyond the number chars. Return 1 if the string doesn't point to */
/* a numeric value. This is used by the DrawTurtle() routine to extract   */
/* motion vector quantities from draw strings, e.g. the "12" in "U12".    */

int IntInString(str)
char **str;
{
  int num = 0, i = 0;

  loop {
    if (**str < '0' || **str > '9')
      return num > 0 ? num : (i < 1 ? 1 : 0);
    num = num*10+(**str)-'0';
    (*str)++;
    i++;
  }
}


/* This routine is used to draw complicated objects composed of lots of line */
/* segments on the screen, such as all the glyphs and coastline pieces. It   */
/* is passed in a string of commands defining what to draw in relative       */
/* coordinates. This is a copy of the format of the BASIC draw command found */
/* in PC's. For example, "U5R10D5L10" means go up 5 dots, right 10, down 5,  */
/* and left 10 - draw a box twice as wide as it is high.                     */

void DrawTurtle(lin, x0, y0)
char *lin;
int x0, y0;
{
  int i, j, x, y, deltax, deltay, blank, noupdate;
  char cmd;

  turtlex = x0; turtley = y0;
  while (cmd = CAP(*lin)) {
    lin++;

    /* 'B' prefixing a command means just move the cursor, and don't draw. */

    if (blank = cmd == 'B') {
      cmd = CAP(*lin);
      lin++;
    }

    /* 'N' prefixing a command means don't update cursor when done drawing. */

    if (noupdate = cmd == 'N') {
      cmd = CAP(*lin);
      lin++;
    }

    /* Here we process the eight directional commands. */

    switch (cmd) {
    case 'U': deltax =  0; deltay = -1; break;      /* Up    */
    case 'D': deltax =  0; deltay =  1; break;      /* Down  */
    case 'L': deltax = -1; deltay =  0; break;      /* Left  */
    case 'R': deltax =  1; deltay =  0; break;      /* Right */
    case 'E': deltax =  1; deltay = -1; break;      /* NorthEast */
    case 'F': deltax =  1; deltay =  1; break;      /* SouthEast */
    case 'G': deltax = -1; deltay =  1; break;      /* SouthWest */
    case 'H': deltax = -1; deltay = -1; break;      /* NorthWest */
    default: PrintError("Bad turtle subcommand.");  /* Shouldn't happen. */
    }
    x = turtlex;
    y = turtley;
    j = IntInString(&lin)*SCALE;    /* Figure out how far to draw. */
    if (blank) {
      turtlex += deltax*j;
      turtley += deltay*j;
    } else {
      if (psfile || metafile) {
        turtlex += deltax*j;
        turtley += deltay*j;
        DrawLine(x, y, turtlex, turtley);
      } else {
        DrawPoint(turtlex, turtley);
        for (i = 0; i < j; i++) {
          turtlex += deltax;
          turtley += deltay;
          DrawPoint(turtlex, turtley);
        }
      }
      if (noupdate) {
        turtlex = x;
        turtley = y;
      }
    }
  }
}
#endif /* GRAPH */

/* xgeneral.c */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色系网站成人免费| 精品午夜一区二区三区在线观看| 成人一区二区三区中文字幕| 国产日韩精品一区二区浪潮av| 精品一区二区三区欧美| 欧美第一区第二区| 国产精品一区二区三区乱码 | 国产一区二区按摩在线观看| 精品美女在线播放| 成人app下载| 亚洲午夜久久久久久久久电影院| 欧美精品丝袜久久久中文字幕| 老汉av免费一区二区三区| 国产日产精品一区| 欧美在线|欧美| 久久99九九99精品| 国产精品久久久久aaaa樱花| 一本色道久久综合狠狠躁的推荐| 无码av免费一区二区三区试看| 久久夜色精品国产欧美乱极品| 成人av一区二区三区| 亚洲成人久久影院| 精品电影一区二区| 色素色在线综合| 韩国一区二区三区| 亚洲狼人国产精品| 久久―日本道色综合久久 | 97se狠狠狠综合亚洲狠狠| 亚洲一区二区三区在线看| 日韩精品影音先锋| 91在线你懂得| 久久精品国产久精国产爱| 亚洲欧洲av色图| 欧美第一区第二区| 欧美视频中文字幕| 国产成人综合亚洲91猫咪| 亚洲国产精品影院| 日本一区二区成人| 精品欧美久久久| 欧美亚洲国产一区二区三区| 成人午夜视频在线| 日韩精品色哟哟| 亚洲欧美成人一区二区三区| 精品88久久久久88久久久| 欧美亚洲日本国产| 91在线观看污| 国产一区欧美日韩| 日韩精品91亚洲二区在线观看 | 国产精品2024| 免费日韩伦理电影| 亚洲成人免费观看| 亚洲激情在线激情| 国产精品乱人伦一区二区| 欧美α欧美αv大片| 欧洲一区二区三区免费视频| 国产成人av电影在线播放| 免费看黄色91| 首页国产欧美久久| 亚洲一区在线观看视频| 亚洲视频在线观看三级| 国产午夜亚洲精品午夜鲁丝片| 91精品国产麻豆| 欧美日韩国产小视频| 91在线免费视频观看| 成人网页在线观看| 成人免费看视频| 国产精品一区二区无线| 国产在线看一区| 狠狠色狠狠色综合| 韩国v欧美v日本v亚洲v| 久草这里只有精品视频| 美女在线视频一区| 精品在线免费视频| 精品一区二区三区蜜桃| 久久精品国产精品亚洲精品| 另类成人小视频在线| 国产在线日韩欧美| 国产suv精品一区二区6| 国产精品1区2区3区| 国产伦精品一区二区三区免费| 激情综合网天天干| 国产综合色在线| 成人少妇影院yyyy| 成人av网站免费| 91免费版pro下载短视频| 色综合一区二区| 精品污污网站免费看| 欧美日韩二区三区| 欧美一区二区三区免费在线看| 日韩一区二区三区免费看| 日韩美女主播在线视频一区二区三区| 日韩视频永久免费| 国产三级三级三级精品8ⅰ区| 日本一区二区三区四区| 亚洲天堂a在线| 亚洲成人av中文| 久久99久久精品欧美| 国产精品一二三区| 92精品国产成人观看免费| 欧美在线观看你懂的| 欧美精品99久久久**| 精品欧美黑人一区二区三区| 日韩—二三区免费观看av| 五月婷婷激情综合网| 麻豆精品久久精品色综合| 风间由美一区二区三区在线观看 | 一本到不卡精品视频在线观看 | 欧美一卡2卡三卡4卡5免费| 精品福利视频一区二区三区| 欧美国产精品中文字幕| 一区二区激情小说| 久久国产精品99久久人人澡| 成人一区在线观看| 9191久久久久久久久久久| www成人在线观看| 国产精品毛片大码女人| 亚洲福利一区二区三区| 美女国产一区二区三区| 成人免费视频网站在线观看| 欧美猛男男办公室激情| 久久精品人人爽人人爽| 夜夜嗨av一区二区三区网页| 久久爱www久久做| 91老司机福利 在线| 日韩视频免费观看高清完整版 | 色综合激情久久| 欧美精品一区二区三区蜜臀| 国产精品久久久久毛片软件| 日本中文字幕一区二区视频| av在线不卡免费看| 精品盗摄一区二区三区| 亚洲国产一区二区三区| 成人伦理片在线| 精品国产一区二区三区忘忧草| 一区二区在线看| 成人激情电影免费在线观看| 日韩欧美国产一区二区在线播放| 亚洲女子a中天字幕| 国产成人av电影| 欧美成人国产一区二区| 午夜视频一区二区| 91视频观看视频| 久久精品免费在线观看| 蜜臀精品久久久久久蜜臀| 91成人国产精品| 亚洲视频免费看| 风间由美性色一区二区三区| 精品国产亚洲在线| 午夜久久久久久久久久一区二区| av电影在线观看一区| 久久精品夜夜夜夜久久| 精品一区二区三区的国产在线播放| 一本到不卡免费一区二区| 中文字幕日本不卡| 懂色av一区二区三区蜜臀| 久久综合久久99| 久久99精品久久久久婷婷| 日韩午夜精品视频| 秋霞成人午夜伦在线观看| 欧美丰满嫩嫩电影| 日韩av网站免费在线| 欧美人与性动xxxx| 午夜视频一区在线观看| 欧美放荡的少妇| 天天综合天天综合色| 欧美一区二区在线视频| 天堂蜜桃一区二区三区| 欧美日韩国产天堂| 日韩精品1区2区3区| 91精品国产欧美日韩| 日韩电影免费在线观看网站| 欧美一区二区三区婷婷月色| 日本美女一区二区| 欧美一区二区三区免费观看视频 | 一本久道久久综合中文字幕 | 91免费精品国自产拍在线不卡| 国产精品区一区二区三| 成人高清免费在线播放| 中文字幕一区二区在线播放| 91片在线免费观看| 亚洲图片自拍偷拍| 日韩一区二区三区视频| 精品亚洲国内自在自线福利| 2021中文字幕一区亚洲| 粉嫩av一区二区三区在线播放| 中文幕一区二区三区久久蜜桃| 成人免费视频网站在线观看| 一区二区三区在线视频免费观看| 欧美综合一区二区| 免费在线观看日韩欧美| 中文字幕精品一区二区精品绿巨人 | 国产精品美女久久久久久久久| 97久久精品人人澡人人爽| 亚洲综合激情另类小说区| 欧美一区二视频| 成人午夜在线免费| 亚洲chinese男男1069| 精品粉嫩aⅴ一区二区三区四区 | 91久久精品网| 美女视频黄免费的久久 |