File: options.h

package info (click to toggle)
xplanet 0.43-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 904 kB
  • ctags: 321
  • sloc: cpp: 3,041; sh: 1,977; makefile: 141
file content (131 lines) | stat: -rw-r--r-- 3,738 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/******************************************************************************
    Xplanet 0.43 - render an image of the earth into an X window
    Copyright (C) 1999 Hari Nair <hari@alumni.caltech.edu>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

******************************************************************************/

#include <sys/time.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

enum projection       { MERCATOR, ORTHOGRAPHIC };
enum ortho_pos        { FIXED, SUNREL, DAYSIDE, NIGHTSIDE, 
			MOONSIDE, EARTHSIDE };
enum render           { ROOT, WINDOW, ANIMATE, OUTPUT };

class options 
{
 public:
  char        *background;
  int          blend;
  int          body;
  int          centx;
  int          centy;
  char        *cloud;
  char        *color;
  char        *day;
  float        dellat;
  float        dellon;
  char        *dem;
  float        demscale;
  render       display;
  char        *font;
  int          fuzz;
  int          grid;
  int          gridspace;
  int          label;
  float        localtime;
  int          markers;
  char        *markerfile;
  projection   mode;
  char        *night;
  float        obslat, obslon;
  char        *output;
  ortho_pos    position;
  int          radius;
  float        range;
  float        rotate;
  float        shade;
  int          size;
  float        star_den;
  int          swap;
  struct timeval time;
  char        *title;
  int          trans;

  unsigned int window_width;
  unsigned int window_height;
  int          window_x;
  int          window_y;
  unsigned int temp;
  int          label_x;
  int          label_y;
  int          label_mask;
  Window       XID;

  options() 
    {
      background       = NULL;
      blend            = 0;
      body             = 0;
      centx            = -1;
      centy            = -1;
      cloud            = NULL; 
      color            = NULL;
      day              = NULL;
      dellon           = 0;
      dellat           = 0;
      dem              = NULL;
      demscale         = 0.05;
      display          = ROOT;
      font             = NULL;
      fuzz             = 6;
      grid             = 0;
      gridspace        = 90;
      label            = 0;
      label_x          = -15;
      label_y          = 15;
      label_mask       = XNegative;
      localtime        = 999;
      markers          = 0;
      markerfile       = NULL;
      mode             = MERCATOR;
      night            = NULL;
      obslat           = 0;
      obslon           = 0;
      output           = NULL;
      position         = FIXED;
      radius           = 50;
      range            = 1000;
      rotate           = 0;
      shade            = 0.3;
      star_den         = 1E-3;
      swap             = 0;
      trans            = 1;
      window_width     = 512;
      window_height    = 512;
      window_x         = 0;
      window_y         = 0;
      XID              = 0;
      gettimeofday (&time, NULL);
    }
  
}; 

extern options opts;

extern void process_args (int argc, char **argv);