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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? options.c

?? 一個占星術(shù)算命游戲
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*
** Astrolog (Version 4.00) File: options.c
**
** IMPORTANT NOTICE: the graphics database and chart display routines
** used in this program are Copyright (C) 1991-1993 by Walter D. Pullen
** (cruiser1@stein.u.washington.edu). Permission is granted to freely
** use and distribute these routines provided one doesn't sell,
** restrict, or profit from them in any way. Modification is allowed
** provided these notices remain with any altered or edited versions of
** the program.
**
** The main planetary calculation routines used in this program have
** been Copyrighted and the core of this program is basically a
** conversion to C of the routines created by James Neely as listed in
** Michael Erlewine's 'Manual of Computer Programming for Astrologers',
** available from Matrix Software. The copyright gives us permission to
** use the routines for personal use but not to sell them or profit from
** them in any way.
**
** The PostScript code within the core graphics routines are programmed
** and Copyright (C) 1992-1993 by Brian D. Willoughby
** (brianw@sounds.wa.com). Conditions are identical to those above.
**
** The extended accurate ephemeris databases and formulas are from the
** calculation routines in the program "Placalc" and are programmed and
** Copyright (C) 1989,1991,1993 by Astrodienst AG and Alois Treindl
** (alois@azur.ch). The use of that source code is subject to
** regulations made by Astrodienst Zurich, and the code is not in the
** public domain. This copyright notice must not be changed or removed
** by any user of this program.
**
** Initial programming 8/28,30, 9/10,13,16,20,23, 10/3,6,7, 11/7,10,21/1991.
** X Window graphics initially programmed 10/23-29/1991.
** PostScript graphics initially programmed 11/29-30/1992.
** Last code change made 12/31/1993.
*/

#include "astrolog.h"


/*
******************************************************************************
** Display Subroutines.
******************************************************************************
*/

/* This is a subprocedure of CreateGrid() and CreateGridRelation(). Given */
/* two planets, determine what aspect, if any, is present between them,   */
/* and save the aspect name and orb in the specified grid cell.           */

void GetAspect(planet1, planet2, ret1, ret2, i, j)
real *planet1, *planet2, *ret1, *ret2;
int i, j;
{
  int k;
  real l, m;

  grid->v[i][j] = grid->n[i][j] = 0;
  l = MinDistance(planet2[i], planet1[j]);
  for (k = aspects; k >= 1; k--) {
    m = l-aspectangle[k];
    if (dabs(m) < Orb(i, j, k)) {
      grid->n[i][j] = k;

      /* If -ga switch in effect, then change the sign of the orb to    */
      /* correspond to whether the aspect is applying or separating.    */
      /* To do this, we check the velocity vectors to see if the        */
      /* planets are moving toward, away, or are overtaking each other. */

      if (exdisplay & DASHga)
        m = SGN2(ret1[j]-ret2[i])*
          SGN2(MinDifference(planet2[i], planet1[j]))*SGN2(m)*dabs(m);
      grid->v[i][j] = (int) (m*60.0);
    }
  }
}


/* Set up the aspect/midpoint grid. Allocate memory for this array, if not */
/* already done. Allocation is only done once, first time this is called.  */

bool EnsureGrid()
{
  char string[STRING];

  if (grid != NULL)
    return TRUE;
  Allocate(grid, sizeof(gridstruct), gridstruct PTR);
  if (grid == NULL
#ifdef PC
    /* For PC's the grid better not cross a segment boundary. */
    || HIWORD(LOWORD(grid) + sizeof(gridstruct)) > 0
#endif
    ) {
    sprintf(string, "Not enough memory for grid (%d bytes).",
      sizeof(gridstruct));
    PrintError(string);
    return FALSE;
  }
  return TRUE;
}


/* Fill in the aspect grid based on the aspects taking place among the */
/* planets in the present chart. Also fill in the midpoint grid.       */

void CreateGrid(acc)
int acc;
{
  int i, j, k;
  real l;

  if (!EnsureGrid())
    return;
  for (j = 1; j <= total; j++) if (!ignore[j])
    for (i = 1; i <= total; i++) if (!ignore[i])

      /* The parameter 'acc' determine what half of the grid is filled in */
      /* with the aspects and what half is filled in with the midpoints.  */

      if (acc ? i > j : i < j)
        GetAspect(planet, planet, ret, ret, i, j);
      else if (acc ? i < j : i > j) {
        l = Mod(Midpoint(planet[i], planet[j])); k = (int)l;    /* Calculate */
        grid->n[i][j] = k/30+1;                                 /* midpoint. */
        grid->v[i][j] = (int)((l-(real)(k/30)*30.0)*60.0);
      } else {
        grid->n[i][j] = ZTOS(planet[j]);
        grid->v[i][j] = (int)(planet[j]-(real)(grid->n[i][j]-1)*30.0);
      }
}


/* This is similar to the previous function; however, this time fill in the */
/* grid based on the aspects (or midpoints if 'acc' set) taking place among */
/* the planets in two different charts, as in the -g -r0 combination.       */

void CreateGridRelation(acc)
int acc;
{
  int i, j, k;
  real l;

  if (!EnsureGrid())
    return;
  for (j = 1; j <= total; j++) if (!ignore[j])
    for (i = 1; i <= total; i++) if (!ignore[i])
      if (!acc)
        GetAspect(planet1, planet2, ret1, ret2, i, j);
      else {
        l = Mod(Midpoint(planet2[i], planet1[j])); k = (int)l;  /* Calculate */
        grid->n[i][j] = k/30+1;                                 /* midpoint. */
        grid->v[i][j] = (int)((l-(real)(k/30)*30.0)*60.0);
      }
}


/*
******************************************************************************
** Multiple Chart Display Subprograms.
******************************************************************************
*/

/* Print out an aspect (or midpoint if -g0 switch in effect) grid of a      */
/* relationship chart. This is similar to the ChartGrid() routine; however, */
/* here we have both axes labeled with the planets for the two charts in    */
/* question, instead of just a diagonal down the center for only one chart. */

void DisplayGridRelation()
{
  int i, j, k, tot = total, temp;

#ifdef INTERPRET
  if (interpret && !(exdisplay & DASHg0)) {
    InterpretGridRelation();
    return;
  }
#endif
  fprintf(S, " 2>");
  for (temp = 0, i = 1; i <= total; i++) if (!ignore[i]) {
    printc(BOXV);
    AnsiColor(objectansi[i]);
    fprintf(S, "%c%c%c", OBJNAM(i));
    AnsiColor(DEFAULT);
    temp++;
    if (column80 && temp >= 19) {
      tot = i;
      i = total;
    }
  }
  fprintf(S, "\n1  ");
  for (i = 1; i <= tot; i++) if (!ignore[i]) {
    printc(BOXV);
    AnsiColor(signansi(ZTOS(planet2[i])));
    fprintf(S, "%2d%c", (int)planet2[i] % 30, DEGR2);
    AnsiColor(DEFAULT);
  }
  fprintf(S, "\nV  ");
  for (i = 1; i <= tot; i++) if (!ignore[i]) {
    printc(BOXV);
    temp = ZTOS(planet2[i]);
    AnsiColor(signansi(temp));
    fprintf(S, "%c%c%c", SIGNAM(temp));
    AnsiColor(DEFAULT);
  }
  printl();
  for (j = 1; j <= total; j++) if (!ignore[j])
    for (k = 1; k <= 4; k++) {
      if (k < 2)
        PrintTab(BOXH, 3);
      else if (k == 2) {
        AnsiColor(objectansi[j]);
        fprintf(S, "%c%c%c", OBJNAM(j));
      } else {
        temp = ZTOS(planet1[j]);
        AnsiColor(signansi(temp));
        if (k == 3)
          fprintf(S, "%2d%c", (int)planet1[j] - (temp-1)*30, DEGR2);
        else
          fprintf(S, "%c%c%c", SIGNAM(temp));
      }
      if (k > 1)
        AnsiColor(DEFAULT);
      for (i = 1; i <= tot; i++) if (!ignore[i]) {
        printc(k < 2 ? BOXC : BOXV);
        temp = grid->n[i][j];
        if (k > 1) {
          if (i == j)
            AnsiColor(REVERSE);
          AnsiColor(exdisplay & DASHg0 ? signansi(temp) :
            aspectansi[temp]);
        }
        if (k < 2)
          PrintTab(BOXH, 3);
        else if (k == 2) {
          if (exdisplay & DASHg0)
            fprintf(S, "%c%c%c", SIGNAM(temp));
          else
            fprintf(S, "%s", temp ? aspectabbrev[temp] : "   ");
        } else if (k == 3) {
          if (exdisplay & DASHg0)
            fprintf(S, "%2d%c", grid->v[i][j]/60, DEGR2);
          else
            if (grid->n[i][j]) {
              if (grid->v[i][j] < 600)
                fprintf(S, "%c%2d", exdisplay & DASHga ?
                  (grid->v[i][j] < 0 ? 'a' : 's') :
                  (grid->v[i][j] < 0 ? '-' : '+'), abs(grid->v[i][j])/60);
              else
                fprintf(S, "%3d", abs(temp)/60);
            } else
              fprintf(S, "   ");
        } else {
          if (grid->n[i][j])
            fprintf(S, "%02d'", abs(grid->v[i][j])%60);
          else
            fprintf(S, "   ");
        }
        AnsiColor(DEFAULT);
      }
      printl();
    }
}


/* Display all aspects between objects in the relationship comparison chart, */
/* one per line, in sorted order based on the total "power" of the aspects,  */
/* as specified with the -r0 -m0 switch combination.                         */

void DisplayAspectRelation()
{
  int pcut = 30000, icut, jcut, phi, ihi, jhi, ahi, p, i, j, k, count = 0;
  real ip, jp;

  loop {
    phi = -1;

    /* Search for the next most powerful aspect in the aspect grid. */

    for (i = 1; i <= total; i++) if (!ignore[i])
      for (j = 1; j <= total; j++) if (!ignore[j])
        if (k = grid->n[i][j]) {
          ip = i <= OBJECTS ? objectinf[i] : 2.5;
          jp = j <= OBJECTS ? objectinf[j] : 2.5;
          p = (int) (aspectinf[k]*(ip+jp)/2.0*
            (1.0-dabs((real)(grid->v[i][j]))/60.0/aspectorb[k])*1000.0);
          if ((p < pcut || (p == pcut && (i > icut ||
            (i == icut && j > jcut)))) && p > phi) {
            ihi = i; jhi = j; phi = p; ahi = k;
          }
        }
    if (phi < 0)    /* Exit when no less powerful aspect found. */
      break;
    pcut = phi; icut = ihi; jcut = jhi;
    count++;                               /* Display the current aspect.   */
#ifdef INTERPRET
    if (interpret) {                       /* Interpret it if -I in effect. */
      InterpretAspectRelation(jhi, ihi);
      continue;
    }
#endif
    fprintf(S, "%3d: ", count);
    PrintAspect(jhi, ZTOS(planet1[jhi]), (int)Sgn(ret1[jhi]), ahi,
      ihi, ZTOS(planet2[ihi]), (int)Sgn(ret2[ihi]), 'A');
    k = grid->v[ihi][jhi];
    AnsiColor(k < 0 ? WHITE : LTGRAY);
    fprintf(S, "- orb: %c%d,%02d'",
      exdisplay & DASHga ? (k < 0 ? 'a' : 's') : (k < 0 ? '-' : '+'),
      abs(k)/60, abs(k)%60);
    AnsiColor(DKGREEN);
    fprintf(S, " - power:%6.2f\n", (real) phi/1000.0);
    AnsiColor(DEFAULT);
  }
}


/* Display locations of all midpoints between objects in the relationship */
/* comparison chart, one per line, in sorted zodiac order from zero Aries */
/* onward, as specified with the -r0 -m switch combination.               */

void DisplayMidpointRelation()
{
  int mcut = -1, icut, jcut, mlo, ilo, jlo, m, i, j, count = 0;

  loop {
    mlo = 21600;

    /* Search for the next closest midpoint farther down in the zodiac. */ 

    for (i = 1; i <= total; i++) if (!ignore[i])
      for (j = 1; j <= total; j++) if (!ignore[j]) {
        m = (grid->n[j][i]-1)*30*60 + grid->v[j][i];
        if ((m > mcut || (m == mcut && (i > icut ||
          (i == icut && j > jcut)))) && m < mlo) {
          ilo = i; jlo = j; mlo = m;
        }
      }
    if (mlo >= 21600)    /* Exit when no midpoint farther in zodiac found. */
      break;
    mcut = mlo; icut = ilo; jcut = jlo;
    count++;                               /* Display the current midpoint. */
#ifdef INTERPRET
    if (interpret) {                       /* Interpret it if -I in effect. */
      InterpretMidpointRelation(ilo, jlo);
      continue;
    }
#endif
    fprintf(S, "%4d: ", count);
    PrintZodiac((real) mlo/60.0);
    printc(' ');
    PrintAspect(ilo, ZTOS(planet1[ilo]), (int)Sgn(ret1[ilo]), 0,
      jlo, ZTOS(planet2[jlo]), (int)Sgn(ret2[jlo]), 'M');
    AnsiColor(DEFAULT);
    fprintf(S, "-%4d degree span.\n",
      (int)MinDistance(planet1[ilo], planet2[jlo]));
  }
}


/* Calculate any of the various kinds of relationship charts. This involves */
/* reading in and storing the planet and house positions for both charts,   */
/* and then combining them in the main single chart in the proper manner.   */
/* If the parameter 'var' is set, then we read the info for the two charts  */
/* from files, otherwise use the info in preset "core" and "second" charts. */

void CastRelation(var)
int var;
{
  int mon, day, yea, i;
  real tim, zon, lon, lat, t1, t2, t;

  /* Read in and cast the first chart. */

  if (var)
    InputData(filename);
  mon = MM; day = DD; yea = YY; tim = TT; zon = ZZ; lon = OO; lat = AA;
  if (var) {
    SetTwin(MM, DD, YY, TT, ZZ, OO, AA);
  } else {
    SetCore(Mon2, Day2, Yea2, Tim2, Zon2, Lon2, Lat2);
  }
  t1 = CastChart(TRUE);
  for (i = 1; i <= SIGNS; i++) {
    house1[i] = house[i];
    inhouse1[i] = inhouse[i];
  }
  for (i = 1; i <= total; i++) {
    planet1[i] = planet[i];
    planetalt1[i] = planetalt[i];
    ret1[i] = ret[i];
  }

  /* Read in the second chart. */

  if (var) {
    InputData(filename2);
    if (relation == DASHrp) {
      progress = TRUE;
      Jdp = (real)MdyToJulian(MM, DD, YY) + TT / 24.0;
      SetCore(mon, day, yea, tim, zon, lon, lat);
    }
  } else {
    SetCore(mon, day, yea, tim, zon, lon, lat);
  }
  SetMain(MM, DD, YY, TT, ZZ, OO, AA);
  t2 = CastChart(TRUE);
  for (i = 1; i <= SIGNS; i++) {
    house2[i] = house[i];
    inhouse2[i] = inhouse[i];
  }
  for (i = 1; i <= total; i++) {
    planet2[i] = planet[i];
    planetalt2[i] = planetalt[i];
    ret2[i] = ret[i];
  }

  /* Now combine the two charts based on what relation we are doing.   */
  /* For the standard -r synastry chart, use the house cusps of chart1 */
  /* and the planets positions of chart2.                              */

  if (relation <= DASHr)
    for (i = 1; i <= SIGNS; i++)
      house[i] = house1[i];

  /* For the -rc composite chart, take the midpoints of the planets/houses. */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品精华液一区二区三区| 7777精品伊人久久久大香线蕉的| 国产成人aaa| 国产成人免费在线视频| 国产麻豆精品一区二区| 韩国三级电影一区二区| 狠狠色2019综合网| 国产精品一区三区| 国产成人免费av在线| 粉嫩aⅴ一区二区三区四区五区 | 日韩va亚洲va欧美va久久| 亚洲成人激情社区| 麻豆精品蜜桃视频网站| 国产一二精品视频| gogogo免费视频观看亚洲一| 91免费版pro下载短视频| 国产欧美精品一区二区三区四区 | 一个色在线综合| 亚洲一区二区视频| 免费在线观看不卡| 国产一区二区调教| 成人中文字幕电影| 日本精品裸体写真集在线观看| 在线观看视频91| 日韩三级电影网址| 中文字幕精品一区二区精品绿巨人| 日韩一区在线免费观看| 亚洲一区二区免费视频| 久久精品国产免费看久久精品| 国产一区999| 色妞www精品视频| 在线播放/欧美激情| 精品成人在线观看| 亚洲欧洲性图库| 三级欧美韩日大片在线看| 国产一区二区h| 色欧美片视频在线观看| 91精品国产福利在线观看| 国产天堂亚洲国产碰碰| 亚洲一级在线观看| 国产精品一区在线观看乱码| 在线观看国产日韩| 久久婷婷成人综合色| 一区二区三区色| 国产在线播放一区| 欧美亚洲综合久久| 久久九九久精品国产免费直播| 亚洲精品视频在线| 国产在线看一区| 在线免费亚洲电影| 国产亚洲一二三区| 亚洲成人www| 成人中文字幕电影| 欧美二区三区91| 中文字幕电影一区| 另类小说欧美激情| 91美女片黄在线| 国产亚洲女人久久久久毛片| 亚洲sss视频在线视频| 粉嫩绯色av一区二区在线观看| 7777精品伊人久久久大香线蕉完整版 | 在线观看视频一区二区| 久久久亚洲午夜电影| 午夜欧美电影在线观看| 成人视屏免费看| 精品三级av在线| 一二三区精品视频| 不卡的电视剧免费网站有什么| 亚洲中国最大av网站| 国产乱码精品一区二区三区五月婷| 欧美视频自拍偷拍| 亚洲欧洲www| 国产精品一区在线观看你懂的| 4hu四虎永久在线影院成人| 最新热久久免费视频| 国产一区二区久久| 日韩欧美亚洲国产另类| 午夜精品久久久久久久99樱桃| av电影一区二区| 国产精品丝袜一区| 国产乱码一区二区三区| 日韩美女视频在线| 免费观看成人av| 欧美日韩一级二级三级| 亚洲影视资源网| 色婷婷久久99综合精品jk白丝| 国产精品久久久久久久午夜片| 国产一区二区在线影院| 日韩欧美一级片| 石原莉奈在线亚洲三区| 欧美日韩精品综合在线| 一区二区三区鲁丝不卡| 91福利精品第一导航| 亚洲女女做受ⅹxx高潮| 99久久国产综合精品色伊| 中文字幕一区二区三区蜜月 | 7777精品伊人久久久大香线蕉超级流畅| 亚洲码国产岛国毛片在线| aaa欧美日韩| 中文字幕欧美一| av激情综合网| 亚洲精品ww久久久久久p站| av电影在线不卡| 一区二区三区在线免费视频| 欧洲亚洲国产日韩| 日日夜夜免费精品| 日韩一区二区三区在线| 老司机精品视频导航| 日韩欧美国产一二三区| 极品销魂美女一区二区三区| 亚洲精品一区二区三区香蕉| 福利一区二区在线观看| 中文字幕精品一区二区三区精品| 波多野结衣一区二区三区| 亚洲老妇xxxxxx| 欧美精品久久久久久久久老牛影院| 日本视频免费一区| 久久亚洲一区二区三区四区| 成人免费视频播放| 亚洲伦在线观看| 91精品在线免费观看| 韩国午夜理伦三级不卡影院| 国产精品网站在线观看| proumb性欧美在线观看| 一区二区三区国产精品| 欧美sm美女调教| 91麻豆精品国产综合久久久久久| 国产精品一线二线三线| 欧美三级欧美一级| 一色桃子久久精品亚洲| 国产天堂亚洲国产碰碰| 99精品国产热久久91蜜凸| 亚洲国产一区二区三区| 日韩欧美一级二级| 不卡的电视剧免费网站有什么| 亚洲一区二区av在线| 精品蜜桃在线看| a在线播放不卡| 日本亚洲三级在线| 国产日产欧美一区| 精品视频在线视频| 国产精品996| 一区二区成人在线视频| 日韩精品一区二区在线| 不卡一卡二卡三乱码免费网站| 亚洲成a天堂v人片| 久久久久久久免费视频了| 色综合婷婷久久| 国产一区二区不卡| 亚洲国产综合色| 中文字幕国产精品一区二区| 91麻豆精品国产91久久久| 波多野结衣中文字幕一区二区三区 | 国产欧美久久久精品影院| 欧美综合亚洲图片综合区| 捆绑变态av一区二区三区 | 成人av手机在线观看| 天堂午夜影视日韩欧美一区二区| 中文字幕巨乱亚洲| 日韩一区二区三区免费看 | 99久久精品免费| 麻豆成人91精品二区三区| 亚洲色图在线看| 国产午夜亚洲精品午夜鲁丝片| 在线一区二区三区| 国产成人av电影在线| 日本欧美加勒比视频| 亚洲男人都懂的| 国产欧美综合在线| 欧美成人精品二区三区99精品| 色综合天天性综合| 国产福利不卡视频| 免费精品99久久国产综合精品| 亚洲色图视频免费播放| 国产欧美日韩视频一区二区 | 亚洲成人福利片| 亚洲人成网站在线| 日本一区二区三区四区在线视频| 日韩一区二区在线观看视频| 欧美性受极品xxxx喷水| 99久久精品国产一区二区三区| 国产精品一品二品| 久久99国产精品免费| 日韩中文字幕麻豆| 亚洲电影一级黄| 亚洲精品免费一二三区| 国产精品不卡在线观看| 亚洲国产成人在线| 久久九九国产精品| 精品久久久三级丝袜| 日韩一区二区免费视频| 亚洲精品国产精华液| 国产精品美女视频| 国产欧美一区二区精品性色超碰| 日韩欧美国产一二三区| 日韩欧美一级二级三级久久久| 91精品国产色综合久久不卡电影 | 欧美三级中文字幕在线观看| 97久久超碰国产精品电影| av成人免费在线|