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

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

?? xdriver.c

?? 一個占星術算命游戲
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
** Astrolog (Version 4.00) File: xdriver.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"

#ifdef GRAPH

#ifdef X11
/* Size of the Astrolog X11 icon. These values are defined in xdata.c too. */

#define icon_width 63
#define icon_height 32
#endif

#ifdef MSG
/* PC specific global variables. */

int hiresmode = DEFHIRESMODE;    /* 'High-resolution' graphics mode. */
int loresmode = DEFLORESMODE;    /* 'Flicker-free' graphics mode.    */
int xscreen   = -1000;           /* Current graphics mode.           */
struct videoconfig config;       /* State of current graphics mode.  */
#endif


/*
******************************************************************************
** Interactive Screen Graphics Routines.
******************************************************************************
*/

#ifdef X11
/* Allocate a color from the present colormap. Given a string like "red" or */
/* "blue" allocate this color and return a value specifying it.             */

colrgb XMakeColor(name)
char *name;
{
  XColor col;
  XParseColor(disp, cmap, name, &col);
  XAllocColor(disp, cmap, &col);
  return col.pixel;
}
#endif


/* Set up all the colors used by the program, i.e. the foreground and   */
/* background colors, and all the colors in the object arrays, based on */
/* whether or not we are in monochrome and/or reverse video mode.       */

void XColorInit()
{
  int i;

#ifdef X11
  if (!xfile) {
    cmap = XDefaultColormap(disp, screen);
    for (i = 0; i < 16; i++)
      rgbind[i] = XMakeColor(rgbname[i]);
  }
#endif
  on  = mainansi[!xreverse];
  off = mainansi[xreverse];
  hilite = xcolor ? mainansi[2+xreverse] : on;
  gray   = xcolor ? mainansi[3-xreverse] : on;
  for (i = 0; i <= 6; i++)
    maincolor[i]    = xcolor ? mainansi[i]    : on;
  for (i = 0; i <= 7; i++)
    rainbowcolor[i] = xcolor ? rainbowansi[i] : on;
  for (i = 0; i < 4; i++)
    elemcolor[i]    = xcolor ? elemansi[i]    : on;
  for (i = 0; i <= ASPECTS; i++)
    aspectcolor[i]  = xcolor ? aspectansi[i]  : on;
  for (i = 0; i <= total; i++)
    objectcolor[i]  = xcolor ? objectansi[i]  : on;
#ifdef X11
  if (!xfile) {
    XSetBackground(disp, gc,   rgbind[off]);  /* Initialize X window colors. */
    XSetForeground(disp, pmgc, rgbind[off]);
  }
#endif
}


#ifdef ISG
/* This routine opens up and initializes a window and prepares it to be */
/* drawn upon, and gets various information about the display, too.     */

void XBegin()
{
#ifdef X11
  disp = XOpenDisplay(dispname);
  if (!disp) {
    PrintError("Can't open display.");
    Terminate(_FATAL);
  }
  screen = DefaultScreen(disp);
  bg = BlackPixel(disp, screen);
  fg = WhitePixel(disp, screen);
  hint.x = offsetx; hint.y = offsety;
  hint.width = chartx; hint.height = charty;
  hint.min_width = BITMAPX1; hint.min_height = BITMAPY1;
  hint.max_width = BITMAPX;  hint.max_height = BITMAPY;
  hint.flags = PPosition | PSize | PMaxSize | PMinSize;
#if FALSE
  wmhint = XGetWMHints(disp, window);
  wmhint->input = True;
  XSetWMHints(disp, window, wmhint);
#endif
  depth = DefaultDepth(disp, screen);
  if (depth < 5) {
    xmono = TRUE;      /* Is this a monochrome monitor? */
    xcolor = FALSE;
  }
  root = RootWindow(disp, screen);
  if (xroot)
    window = root;     /* If -XB in effect, we'll use the root window. */
  else
    window = XCreateSimpleWindow(disp, DefaultRootWindow(disp),
      hint.x, hint.y, hint.width, hint.height, 5, fg, bg);
  pixmap = XCreatePixmap(disp, window, chartx, charty, depth);
  icon = XCreateBitmapFromData(disp, DefaultRootWindow(disp),
    icon_bits, icon_width, icon_height);
  if (!xroot)
    XSetStandardProperties(disp, window, appname, appname, icon,
      (char PTR PTR)xkey, 0, &hint);

  /* We have two graphics workareas. One is what the user currently sees in */
  /* the window, and the other is what we are currently drawing on. When    */
  /* done, we can quickly copy this to the viewport for a smooth look.      */

  gc = XCreateGC(disp, window, 0, 0);
  XSetGraphicsExposures(disp, gc, 0);
  pmgc = XCreateGC(disp, window, 0, 0);
  XColorInit();                            /* Go set up colors. */
  if (!xroot)
    XSelectInput(disp, window, KeyPressMask | StructureNotifyMask |
      ExposureMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask);
  XMapRaised(disp, window);
  XSync(disp, 0);
  XFillRectangle(disp, pixmap, pmgc, 0, 0, chartx, charty);

#else /* MSG */

  if (!IsValidResmode(xscreen))    /* Initialize graphics mode to hi-res. */
    xscreen = hiresmode;
  _setvideomode(xscreen);
  if (_grstatus()) {
    PrintError("Can't enter graphics mode.");
    Terminate(_FATAL);
  }
  _getvideoconfig((struct videoconfig far *) &config);
  if (config.numcolors < 16) {
    xmono = TRUE;
    xcolor = FALSE;
  }
  _remapallpalette((long FAR *) rgb);
  _setactivepage(0);
  _setvisualpage(0);
  XColorInit();
#ifdef MOUSE
  if (MouseInit() > 0)
    SetPtrVis(SHOW);
#endif
  textrows = abs(textrows);    /* Make sure we reset textrows upon restart. */
#endif /* MSG */
}


/* Add a certain amount of time to the current hour/day/month/year quantity */
/* defining the present chart. This is used by the chart animation feature. */
/* We can add or subtract anywhere from 1 to 9 seconds, minutes, hours,     */
/* days, months, years, decades, centuries, or millenia in any one call.    */
/* This is mainly just addition to the appropriate quantity, but we have    */
/* to check for overflows, e.g. Dec 30 + 3 days = Jan 2 of Current year + 1 */

void AddTime(mode, toadd)
int mode, toadd;
{
  int d;
  real h, m;

  h = floor(TT);
  m = FRACT(TT)*100.0;
  if (mode == 1)
    m += 1.0/60.0*(real)toadd;    /* Add seconds. */
  else if (mode == 2)
    m += (real)toadd;             /* add minutes. */

  /* Add hours, either naturally or if minute value overflowed. */

  if (m < 0.0 || m >= 60.0 || mode == 3) {
    if (m >= 60.0) {
      m -= 60.0; toadd = SGN(toadd);
    } else if (m < 0.0) {
      m += 60.0; toadd = SGN(toadd);
    }
    h += (real)toadd;
  }

  /* Add days, either naturally or if hour value overflowed. */

  if (h >= 24.0 || h < 0.0 || mode == 4) {
    if (h >= 24.0) {
      h -= 24.0; toadd = SGN(toadd);
    } else if (h < 0.0) {
      h += 24.0; toadd = SGN(toadd);
    }
    DD += toadd;
  }

  /* Add months, either naturally or if day value overflowed. */

  if (DD > (d = DayInMonth(MM, YY)) || DD < 1 || mode == 5) {
    if (DD > d) {
      DD -= d; toadd = SGN(toadd);
    } else if (DD < 1) {
      DD += DayInMonth(Mod12(MM - 1), YY);
      toadd = SGN(toadd);
    }
    MM += toadd;
  }

  /* Add years, either naturally or if month value overflowed. */

  if (MM > 12 || MM < 1 || mode == 6) {
    if (MM > 12) {
      MM -= 12; toadd = SGN(toadd);
    } else if (MM < 1) {
      MM += 12; toadd = SGN(toadd);
    }
    YY += toadd;
  }
  if (mode == 7)
    YY += 10 * toadd;      /* Add decades.   */
  else if (mode == 8)
    YY += 100 * toadd;     /* Add centuries. */
  else if (mode == 9)
    YY += 1000 * toadd;    /* Add millenia.  */
  TT = h+m/100.0;          /* Recalibrate hour time. */
}


/* Animate the current chart based on the given values indicating how much  */
/* to update by. We update and recast the current chart info appropriately. */

void Animate(mode, toadd)
int mode, toadd;
{
  if (modex == MODEW || modex == MODEG || modex == MODEP) {
    degree += toadd;
    if (degree >= DEGR)     /* For animating globe display, add */
      degree -= DEGR;       /* in appropriate degree value.     */
    else if (degree < 0)
      degree += DEGR;
  } else {
    if (mode == 10) {
#ifdef TIME
      /* For the continuous chart update to present moment */
      /* animation mode, go get whatever time it is now.   */
      InputData("now");
#else
      SetCore(Mon, Day, Yea, Tim, Zon, Lon, Lat);
      AddTime(1, toadd);
#endif
    } else {  /* Otherwise add on appropriate time vector to chart info. */
      SetCore(Mon, Day, Yea, Tim, Zon, Lon, Lat);
      AddTime(mode, toadd);
    }
    SetMain(MM, DD, YY, TT, ZZ, OO, AA);
    if (relation)
      CastRelation(FALSE);
    else
      CastChart(TRUE);
  }
}


/* Print a list of every key that one can press in an X window to do a */
/* certain function, and a description of what it does. This list gets */
/* displayed whenever one presses the 'H' or '?' key in the window.    */

void XDisplayKeys()
{
  char string[STRING];

  sprintf(string, "\n%s window keypress options (version %s):", appname,
    VERSION);
  Prints(string);
  Prints(" Press 'H' or '?' to display this list of key options.");
  Prints(" Press 'p' to toggle pause status on or off.");
  Prints(" Press 'x' to toggle fg/bg colors on screen.");
  Prints(" Press 'm' to toggle color/monochrome display on screen.");
  Prints(" Press 'i' to toggle status of the minor chart modification.");
  Prints(" Press 'T' to toggle header info on current chart on screen.");
  Prints(" Press 'b' to toggle drawing of a border around the chart.");
  Prints(" Press 'l' to toggle labeling of object points in chart.");
  Prints(" Press 'v' to display current chart positions on text screen.");
  Prints(" Press 'R', 'C', 'u', 'U' to toggle restriction status of minor");
  Prints("       objects, minor house cusps, uranian planets, and stars.");
  Prints(" Press 'c' to toggle relationship comparison chart mode.");
  Prints(" Press 's', 'h', 'f', 'F' to toggle status of sidereal zodiac,");
  Prints("       heliocentric charts, domal charts, and decan charts.");
  Prints(" Press 'O' and 'o' to recall/store a previous chart from memory.");
#ifdef X11
  Prints(" Press 'B' to dump current window contents to root background.");
#else
  Prints(" Press 'B' to resize chart display to full size of screen.");
#endif
  Prints(" Press 'Q' to resize chart display to a square.");
  Prints(" Press '<' and '>' to decrease/increase the scale size of the");
  Prints("       glyphs and the size of world map.");
  Prints(" Press '[' and ']' to decrease/increase tilt in globe display.");
  Prints(" Press '+' and '-' to add/subtract a day from current chart.");
#ifdef TIME
  Prints(" Press 'n' to set chart information to current time now.");
#endif
  Prints(" Press 'N' to toggle animation status on or off. Charts will");
  Prints("       be updated to current status and globe will rotate.");
  Prints(" Press '!'-'(' to begin updating current chart by adding times.");
  Prints("       !: seconds, @: minutes, #: hours, $: days, %: months,");
  Prints("       ^: years, &: years*10, *: years*100, (: years*1000.");
  Prints(" Press 'r' to reverse direction of time-lapse or animation.");
  Prints(" Press '1'-'9' to set rate of animation to 'n' degrees, etc.");
#ifdef MSG
  Prints(" Press '1'-'9' to determine section of chart to show if clipped.");
#endif
  Prints(
    " Press 'V','L','A','Z','S','E','W','G','P' to switch to normal (_v),");
  Prints(
    "       astro-graph (_L), grid (_g), local (_Z), space (_S), ephemeris");
  Prints("       (_E), world map (_XW), globe (_XG), and polar (_XP) modes.");
  Prints(" Press '0' to toggle between _Z,_Z0 & _XW,_XW0 & _E,_Ey modes.");
  Prints(" Press 'space' to force update of current graphics display.");
#ifdef MSG
  Prints(" Press 'tab' to toggle between graphics resolutions.");
#endif
  Prints(" Press 'q' to terminate the window and program.");
#ifdef MOUSE
  printl();
#ifdef X11
  Prints(" Left   mouse button: Draw line strokes on chart in window.");
  Prints(" Middle mouse button: Print coordinates of pointer on world map.");
  Prints(" Right  mouse button: Terminate the window and program.");
#endif
#ifdef MSG
  Prints(" Left  mouse button: Draw line strokes on chart in screen.");
  Prints(" Right mouse button: Set coordinates to pointer on world map.");
#endif
#endif /* MOUSE */
}


/* This routine gets called after an X window is brought up and displayed   */
/* on the screen. It loops, processing key presses, mouse clicks, etc, that */
/* the window receives, until the user specifies they want to exit program. */

void XSpin()
{
#ifdef X11
  XEvent event;
  int xresize = FALSE, xredraw = TRUE;
#else
#ifdef MOUSE
  EVENT event;
#endif
  int xresize = TRUE, xredraw = FALSE;
#endif
  int xbreak = FALSE, xpause = FALSE, xcast = FALSE, xcorner = 7,
    buttonx = -1, buttony = -1, dir = 1, length, i;
  colpal coldrw = hilite;

  xnow = -xnow;
  while (!xbreak) {

    /* Some chart windows, like the world maps and aspect grids, should */
    /* always be a certian size, so correct if a resize was attempted.  */

    if (modex == MODEL || modex == MODEW) {
      length = DEGR*SCALE+2;
      if (chartx != length) {
        chartx = length;
        xresize = TRUE;
      }
      length = (90*2+1)*SCALE+2;
      if (charty != length) {
        charty = length;
        xresize = TRUE;
      }
    } else if (modex == MODEg) {
      if (chartx !=
        (length = (gridobjects + (relation <= DASHr0))*CELLSIZE*SCALE+1)) {
        chartx = length;
        xresize = TRUE;
      } if (charty != length) {
        charty = length;
        xresize = TRUE;
      }

    /* Make sure the window isn't too large or too small. */

    } else {
	    if (chartx < BITMAPX1) {
	      chartx = BITMAPX1;
	      xresize = TRUE;
	    } else if (chartx > BITMAPX) {
	      chartx = BITMAPX;
	      xresize = TRUE;
	    }
	    if (charty < BITMAPY1) {
	      charty = BITMAPY1;
	      xresize = TRUE;
	    } else if (charty > BITMAPY) {
	      charty = BITMAPY;
	      xresize = TRUE;
	    }
		}

    /* If in animation mode, ensure we are in the flicker free resolution. */

    if (xnow < 0) {
      xnow = -xnow;
#ifdef MSG
      if (xscreen == hiresmode) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影在线一区| 99精品视频免费在线观看| 精品乱人伦一区二区三区| 蜜臀精品久久久久久蜜臀| 精品久久一二三区| 国产三级欧美三级| 国产成人av电影在线播放| 中文字幕在线不卡一区| 在线视频一区二区三| 亚洲v中文字幕| 精品国产乱码久久久久久久久| 国产高清亚洲一区| 综合激情成人伊人| 欧美揉bbbbb揉bbbbb| 蜜桃av一区二区三区| 久久精品免费在线观看| 91啪亚洲精品| 天天操天天综合网| 久久久精品影视| 色综合夜色一区| 日韩不卡手机在线v区| 亚洲精品在线观看视频| 99在线精品视频| 午夜精品福利一区二区三区av | 5566中文字幕一区二区电影| 看电影不卡的网站| 国产精品久久久久影院色老大| 日本韩国一区二区三区视频| 日韩经典中文字幕一区| 精品国产乱码久久久久久图片| 波多野结衣亚洲一区| 午夜国产精品影院在线观看| 久久综合999| 色婷婷av久久久久久久| 久久狠狠亚洲综合| 亚洲精品美腿丝袜| 精品国产乱码久久久久久久| 色综合久久综合网欧美综合网| 久久综合综合久久综合| 99久久伊人精品| 日本一道高清亚洲日美韩| 日本一区二区三区dvd视频在线| 欧美性受xxxx黑人xyx| 国产制服丝袜一区| 亚洲图片欧美一区| 国产精品区一区二区三| 91精品在线一区二区| 成人app网站| 美女免费视频一区| 亚洲一二三四区| 欧美国产一区在线| 日韩一区国产二区欧美三区| 99re成人精品视频| 国内久久精品视频| 亚洲超碰精品一区二区| 综合电影一区二区三区 | 成人国产视频在线观看 | 日韩制服丝袜先锋影音| 国产精品视频在线看| 日韩三级电影网址| 欧美午夜一区二区三区免费大片| 国产成人午夜精品影院观看视频| 首页国产欧美日韩丝袜| 亚洲美女区一区| 中文在线资源观看网站视频免费不卡| 日韩欧美专区在线| 91国产丝袜在线播放| 中文字幕免费一区| 欧美成人video| 欧美日韩国产综合视频在线观看| 99久免费精品视频在线观看| 国产在线麻豆精品观看| 亚洲成年人网站在线观看| 亚洲欧美在线视频| 欧美激情综合五月色丁香小说| 日韩区在线观看| 欧美精品tushy高清| 日本高清不卡一区| 不卡av在线网| 丁香婷婷综合五月| 国产一区二区在线视频| 美女国产一区二区| 日韩不卡在线观看日韩不卡视频| 亚洲激情一二三区| 日韩伦理免费电影| 亚洲国产精华液网站w| 久久久久久久久久美女| 精品日韩一区二区三区| 91精品国产aⅴ一区二区| 欧美日韩黄色影视| 欧美日韩中文另类| 欧美日韩在线三区| 欧美中文字幕一区| 日本韩国欧美在线| 欧美在线视频全部完| 欧美性猛交一区二区三区精品| 一本一道波多野结衣一区二区| av不卡在线观看| 99久久精品一区| 99久久精品免费看国产| www.欧美.com| 亚洲品质自拍视频网站| 亚洲欧洲成人自拍| 国产精品久久久久久久久免费相片| 国产欧美日产一区| 国产清纯白嫩初高生在线观看91| 久久久久久久综合| 中文字幕欧美日韩一区| 国产精品欧美极品| 亚洲视频免费在线| 一区二区三区中文字幕电影 | 免费成人性网站| 久久国产精品99久久久久久老狼| 久久精品国内一区二区三区| 经典一区二区三区| 国产精品一区二区三区乱码| 成人黄色小视频| 91视频精品在这里| 91久久精品网| 6080日韩午夜伦伦午夜伦| 日韩精品一区二区三区在线播放| 精品少妇一区二区三区视频免付费| 精品国精品自拍自在线| 久久久99精品免费观看不卡| 国产精品国产自产拍高清av| 亚洲久本草在线中文字幕| 亚洲一区二区在线观看视频 | 日韩毛片一二三区| 亚洲一区二区免费视频| 亚洲国产成人av| 久久超碰97中文字幕| 国产xxx精品视频大全| 91麻豆精品在线观看| 欧美在线免费视屏| 91麻豆精品91久久久久同性| 久久久综合九色合综国产精品| 亚洲国产岛国毛片在线| 亚洲综合一二区| 蜜桃一区二区三区四区| 国产1区2区3区精品美女| 91久久奴性调教| 日韩久久精品一区| 中文字幕日韩一区| 性做久久久久久| 国产一区二区三区免费在线观看| 91香蕉视频黄| 91麻豆精品国产91久久久使用方法 | 亚洲第一久久影院| 美国欧美日韩国产在线播放| 成人一区二区视频| 欧洲视频一区二区| 精品国产91久久久久久久妲己 | 日韩欧美国产三级电影视频| 国产精品水嫩水嫩| 日日欢夜夜爽一区| 国产精品69毛片高清亚洲| 色婷婷亚洲综合| 精品国产亚洲在线| 日韩一区中文字幕| 日本成人在线看| 99久久亚洲一区二区三区青草| 91精品久久久久久久99蜜桃| 国产精品日日摸夜夜摸av| 午夜视频一区在线观看| 国产精品一区二区在线观看不卡| 欧美性高清videossexo| 久久久午夜精品理论片中文字幕| 亚洲欧美偷拍卡通变态| 美日韩一区二区三区| 91丨九色丨尤物| 精品理论电影在线| 一区二区三区丝袜| 国产一区二区剧情av在线| 在线亚洲一区二区| 国产亚洲精品aa| 首页亚洲欧美制服丝腿| av在线播放成人| 精品国产乱码久久| 欧美视频一区二区在线观看| 久久久久国产精品免费免费搜索| 亚洲影院免费观看| 国产成人精品三级| 91精品国产综合久久久蜜臀图片 | 欧美国产日韩精品免费观看| 丝袜亚洲另类欧美综合| 99视频精品免费视频| 精品理论电影在线观看| 亚洲va国产天堂va久久en| 成人a级免费电影| 精品国产乱码久久| 日本怡春院一区二区| 在线欧美日韩精品| 中文字幕一区二区三区在线播放| 久久99久久久欧美国产| 欧美三区免费完整视频在线观看| 中文字幕欧美三区| 国产精品一区二区果冻传媒| 日韩欧美一区中文| 亚洲第一主播视频| 91电影在线观看|