forked from CruiserOne/Astrolog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastrolog.h
2068 lines (1882 loc) · 70.8 KB
/
astrolog.h
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
** Astrolog (Version 7.20) File: astrolog.h
**
** IMPORTANT NOTICE: Astrolog and all chart display routines and anything
** not enumerated below used in this program are Copyright (C) 1991-2021 by
** Walter D. Pullen ([email protected], http://www.astrolog.org/astrolog.htm).
** Permission is granted to freely use, modify, and distribute these
** routines provided these credits and notices remain unmodified with any
** altered or distributed versions of the program.
**
** The main ephemeris databases and calculation routines are from the
** library SWISS EPHEMERIS and are programmed and copyright 1997-2008 by
** Astrodienst AG. The use of that source code is subject to the license for
** Swiss Ephemeris Free Edition, available at http://www.astro.com/swisseph.
** This copyright notice must not be changed or removed by any user of this
** program.
**
** Additional 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 ([email protected]). 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.
**
** The original planetary calculation routines used in this program have
** been copyrighted and the initial core of this program was mostly a
** conversion to C of the routines created by James Neely as listed in
** 'Manual of Computer Programming for Astrologers', by Michael Erlewine,
** available from Matrix Software.
**
** Atlas composed using data from https://www.geonames.org/ licensed under a
** Creative Commons Attribution 4.0 License. Time zone changes composed using
** public domain TZ database: https://data.iana.org/time-zones/tz-link.html
**
** The PostScript code within the core graphics routines are programmed
** and Copyright (C) 1992-1993 by Brian D. Willoughby ([email protected]).
**
** More formally: 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 and inspiring, 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, a copy of which is in the
** LICENSE.HTM file included with Astrolog, and at http://www.gnu.org
**
** Initial programming 8/28-30/1991.
** X Window graphics initially programmed 10/23-29/1991.
** PostScript graphics initially programmed 11/29-30/1992.
** Last code change made 4/10/2021.
*/
/*
** TO COMPILE: For most systems, especially Unix, Windows, and Macs, the only
** changes that should need to be made to the code are to edit or comment the
** #define's below to equal the particulars of your own system and locale.
**
** SYSTEM SECTION: These settings describe platform and hardware specifics.
** They are all required to be set properly or the program probably won't
** even compile. Some of these are technically optional and can be commented
** out even if your system would normally support them, e.g. the X11 graphics
** can be disabled even if you are running a system that supports X windows.
*/
//#define PC /* Comment out this #define if you have a Unix, Mac, or other */
/* system that isn't a generic PC running DOS or MS Windows. */
//#define MACOLD /* Comment out this #define if you're not compiling for an */
/* old pre-OSX Mac. Modern Mac systems should not use this. */
#define X11 /* Comment out this #define if you don't have X windows, or */
/* else have them and don't wish to compile in X graphics. */
//#define WIN /* Comment out this #define if you don't have MS Windows, or */
/* else have them but want a command line version instead. */
//#define MACG /* Comment out this #define if you don't have a Mac, or else */
/* have one and don't wish to compile in Mac screen graphics. */
/* Note modern Mac's may be able to compile with X11 instead. */
//#define WCLI /* Comment out this #define if you don't want to compile a */
/* command line Windows version that can still popup windows. */
#define TIME /* Comment out this #define if your compiler can't take the */
/* calls to the 'time' or 'localtime' functions as in time.h */
#define SWITCHES /* Comment out this #define if your system can not handle */
/* parameters on the command line (such as Mac's). */
#define ENVIRON /* Comment out this #define if your system doesn't have */
/* environment variables or can't compile calls to them. */
//#define ATOF /* Comment out this #define if you have a system in which */
/* 'atof' and related functions aren't defined in stdio.h, */
/* such as most PC's, Linux, VMS compilers, and NeXT's. */
#define PROTO /* Comment out this #define if you have an ancient compiler */
/* which doesn't allow full Ansi function prototypes. This */
/* is for programmers only and has no effect on executable. */
/*
** FEATURES SECTION: These settings describe features that are always
** available to be compiled into the program no matter what platform or
** hardware is available. Their settings are always optional. Warning: If you
** disable any of these, you may need to remove switches from the default
** astrolog.as settings file, that correspond to features no longer available.
*/
#define GRAPH /* Comment out this #define if you don't want any graphics */
/* in the program. This switch allows at least generation of */
/* bitmap files and must be set if any of the more advanced */
/* graphics feature additions are also compiled in. */
#define SWISS /* Comment out this #define if you don't want the Swiss */
/* Ephemeris most accurate calculation features and formulas */
/* to be compiled into the program (as accessed with -b). */
#define PLACALC /* Comment out this #define if you don't want the Placalc */
/* less accurate calculation features and formulas to be */
/* compiled into the program (as accessed with -bp). */
#define MATRIX /* Comment out this #define if you don't want the Matrix */
/* much less accurate calculation formulas to be compiled */
/* into the program (as accessed with -bm). */
#define PS /* Comment out this #define if you don't want the ability to */
/* generate charts in the PostScript graphics format. */
#define META /* Comment out this #define if you don't want the ability to */
/* generate charts in the MS Windows metafile picture format. */
#define WIRE /* Comment out this #define if you don't want the ability to */
/* generate charts in the Daedalus wireframe vector format. */
#define ATLAS /* Comment out this #define if you don't want the built in */
/* city atlas and time zone change features in the program. */
#define INTERPRET /* Comment out this #define if you don't want the ability */
/* to display interpretations of the various chart types. */
#define ARABIC /* Comment out this #define if you don't want any chart */
/* lists that include Arabic parts included in the program. */
#define CONSTEL /* Comment out this #define if you don't want any of the */
/* astronomical constellation charts in the program. */
#define BIORHYTHM /* Comment out this #define if you don't want the */
/* non-astrological biorhythm charts in the program. */
#define EXPRESS /* Comment out this #define if you don't want programmable */
/* AstroExpression customization options in the program. */
/*
** DATA CONFIGURATION SECTION: These settings describe particulars of
** your own location and where the program looks for certain info. It is
** recommended that these values be changed appropriately, although the
** program will still run if they are left alone. They may also be
** specified within the default settings file or in the program itself.
*/
#ifndef PC
#define DEFAULT_DIR "~/astrolog"
#else
#define DEFAULT_DIR "C:\\Astrolog"
#endif
// Change this string to directory path program should look in for the
// astrolog.as default file, if one is not in the executable directory, the
// current directory, or in directories indicated by Astrolog environment
// variables. For PC systems, use two backslashes instead of one forward
// slash to divide subdirectories. For Unix systems, it may be necessary to
// expand "~" to the full path. Files will still be found even if not set!
#define CHART_DIR DEFAULT_DIR
// This string is the directory the program looks in for chart info files
// (-i switch) if not in the executable or current directory. This is
// normally the default dir above but may be changed to be somewhere else.
#define EPHE_DIR DEFAULT_DIR
// This string is the directory the program looks in for the ephemeris files
// as accessed with the -b switch. This is normally the default dir above
// but may be changed to be somewhere else.
#define DEFAULT_LONG DM(122,20)
#define DEFAULT_LAT DM(47, 36)
// Change numbers to longitude and latitude of your current location. Use
// negative values for eastern or southern degrees.
#define DEFAULT_ZONE 8.00
// Change this number to the time zone of your current location in hours
// before (west of) UTC. Use negative values for eastern zones.
/*
** OPTIONAL CONFIGURATION SECTION: Although not necessary, one may like
** to change some of the values below: These constants affect some of
** the default parameters and related options. They may also be
** specified within the default settings file or in the program itself.
*/
#define DEFAULT_SYSTEM 0
// Normally, Placidus houses are used (unless the user specifies otherwise).
// If you want a different default system, change this number to a value
// from 0-21 (values same as in -c switch).
#define DEFAULT_ASPECTS 5
// Default number of aspects to include in charts.
#define DIVISIONS 48
// Greater numbers means more accuracy but slower calculation, of exact
// aspect and transit times.
#define DEFAULT_INFOFILE "astrolog.as"
// Name of file to look in for default program settings (which will override
// the compile time values here, if the file exists).
#define DEFAULT_ATLASFILE "atlas.as"
// Name of file to look in for default atlas city and time zone list.
#define DEFAULT_TIMECHANGE "timezone.as"
// Name of file to look in for default list of time zone changes.
#define BITMAP_EARTH "earth.bmp"
// Name of file to look in for bitmap of world map.
#define ENVIRONALL "ASTROLOG"
#define ENVIRONVER "ASTR"
// Name of environment variables to look in for chart, ephemeris, and
// default files. The second name is a version specific variable which can
// also have the current version appended to it before it is accessed.
#define WHEELCOLS 15 // Affects width of each house in wheel display.
#define WHEELROWS 11 // Max no. of objects that can be in a wheel house.
#define SCREENWIDTH 80 // Number of columns to print interpretations in.
#define MONTHSPACE 3 // Number of spaces between each calendar column.
#define MAXINDAY 200 // Max number of aspects or transits displayable.
#define MAXCROSS 750 // Max number of latitude crossings displayable.
#define BIODAYS 14 // Days to include in graphic biorhythms.
#define CREDITWIDTH 74 // Number of text columns in the -Hc credit screen.
#define MAXSWITCHES 100 // Max number of switch parameters per input line.
#define PSGUTTER 9 // Points of white space on PostScript page edge.
#ifdef GRAPH // For graphics, this char affects how bitmaps are
#ifndef PC // written. 'N' is written like with the 'bitmap
#define BITMAPMODE 'C' // program, 'C' is compacted somewhat (files have
#else // less spaces), and 'V' is compacted even more.
#define BITMAPMODE 'B' // 'A' means write as rectangular Ascii text file.
#endif // 'B' means write as Windows bitmap (.bmp) file.
#endif // GRAPH
/*
** By the time you reach here and the above values are customized as
** desired, Astrolog is ready to be compiled! Be sure to similarly
** change the values in the astrolog.as file, which will override any
** corresponding compile time values here. Don't change any of the
** values in the section below unless you know what you're doing.
*/
#ifdef GRAPH
#define BITMAPX 2730 // Maximum window size allowed.
#define BITMAPY 2730
#define BITMAPX1 180 // Minimum window size allowed.
#define BITMAPY1 180
#define DEFAULTX 600 // Default window size.
#define DEFAULTY 600
#define SIDESIZE 160 // Size of wheel chart information sidebar.
#define MAXMETA 1000000 // Max bytes allowed in a metafile.
#define METAMUL 12 // Metafile coordinate to chart pixel ratio.
#define PSMUL 11 // PostScript coordinate to chart pixel ratio.
#define WIREMUL 10 // Wireframe coordinate to chart pixel ratio.
#define CELLSIZE 14 // Size for each cell in the aspect grid.
#define DEGINC 2 // Number of degrees per segment for circles.
#define DEFORB 7.0 // Min distance glyphs can be from each other.
#define MAXSCALE 400 // Max scale factor as passed to -Xs swtich.
#endif // GRAPH
// Ascii and other characters used to display text charts.
#define chH (char)(us.fAnsiChar ? 196 : '-')
#define chV (char)(us.fAnsiChar ? 179 : '|')
#define chC (char)(us.fAnsiChar ? 197 : '|')
#define chNW (char)(us.fAnsiChar ? 218 : '+')
#define chNE (char)(us.fAnsiChar ? 191 : '+')
#define chSW (char)(us.fAnsiChar ? 192 : '+')
#define chSE (char)(us.fAnsiChar ? 217 : '+')
#define chJN (char)(us.fAnsiChar ? 193 : '-')
#define chJS (char)(us.fAnsiChar ? 194 : '-')
#define chJW (char)(us.fAnsiChar ? 180 : '|')
#define chJE (char)(us.fAnsiChar ? 195 : '|')
#define chDeg0 (char)(us.fAnsiChar ? 248 : ' ')
#define chDeg1 (char)(us.fAnsiChar ? 248 : ':')
/*
** One shouldn't ever need to change anything below this line to compile.
*/
//#define BETA // Uncomment to compile in beta message on startup.
#define ASTROLOG
#ifdef _DEBUG
#define DEBUG
#endif
#ifdef SWISS
#define EPHEM
#ifdef GRAPH
#define SWISSGRAPH
#endif
#endif
#ifdef PLACALC
#define EPHEM
#endif
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE
#include <stdio.h>
#ifndef ATOF
#include <stdlib.h>
#endif
#include <math.h>
#ifdef PC
#include <malloc.h>
#include <windows.h>
#endif
#ifdef TIME
#include <time.h>
#endif
#ifdef X11
#define ISG
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
#ifdef WIN
#define ISG
#define WINANY
#include <windows.h>
#include <commdlg.h>
#include <objbase.h>
#include <comdef.h>
#include <comdefsp.h>
#include <shlobj.h>
#include <shobjidl.h>
#include <shlwapi.h>
#include "resource.h"
#endif
#ifdef MACG
#define ISG
#endif
#ifdef WCLI
#define ISG
#define WINANY
#include <windows.h>
#endif
#ifdef PC
#ifdef _WIN64
#define szArchCore "64 bit"
#else
#define szArchCore "32 bit"
#endif
#define INLINE __forceinline
#else
#define INLINE inline
#endif // PC
#ifdef PS
#define VECTOR
#endif
#ifdef META
#define VECTOR
#endif
#ifdef WIRE
#define VECTOR
#endif
/*
** Make sure only legal combinations of options are active.
*/
#ifdef PLACALC
#ifndef MATRIX
#error "If 'PLACALC' is defined 'MATRIX' must be too"
#endif
#endif // PLACALC
#ifdef MACOLD
#ifdef SWITCHES
#error "If 'MACOLD' is defined 'SWITCHES' must not be as well"
#endif
#ifdef ENVIRON
#error "If 'MACOLD' is defined 'ENVIRON' must not be as well"
#endif
#endif // MACOLD
#ifdef X11
#ifndef GRAPH
#error "If 'X11' is defined 'GRAPH' must be too"
#endif
#ifdef WIN
#error "If 'X11' is defined 'WIN' must not be as well"
#endif
#ifdef MACG
#error "If 'X11' is defined 'MACG' must not be as well"
#endif
#ifdef WCLI
#error "If 'X11' is defined 'WCLI' must not be as well"
#endif
#ifdef PC
#error "If 'X11' is defined 'PC' must not be as well"
#endif
#endif // X11
#ifdef WIN
#ifndef GRAPH
#error "If 'WIN' is defined 'GRAPH' must be too"
#endif
#ifdef X11
#error "If 'WIN' is defined 'X11' must not be as well"
#endif
#ifdef MACG
#error "If 'WIN' is defined 'MACG' must not be as well"
#endif
#ifdef WCLI
#error "If 'WIN' is defined 'WCLI' must not be as well"
#endif
#ifndef PC
#error "If 'WIN' is defined 'PC' must be too"
#endif
#endif // WIN
#ifdef MACG
#ifndef GRAPH
#error "If 'MACG' is defined 'GRAPH' must be too"
#endif
#ifdef X11
#error "If 'MACG' is defined 'X11' must not be as well"
#endif
#ifdef WIN
#error "If 'MACG' is defined 'WIN' must not be as well"
#endif
#ifdef WCLI
#error "If 'MACG' is defined 'WCLI' must not be as well"
#endif
#ifdef PC
#error "If 'MACG' is defined 'PC' must not be as well"
#endif
#endif // MACG
#ifdef WCLI
#ifndef GRAPH
#error "If 'WCLI' is defined 'GRAPH' must be too"
#endif
#ifdef X11
#error "If 'WCLI' is defined 'X11' must not be as well"
#endif
#ifdef WIN
#error "If 'WCLI' is defined 'WIN' must not be as well"
#endif
#ifdef MACG
#error "If 'WCLI' is defined 'MACG' must not be as well"
#endif
#ifndef PC
#error "If 'WCLI' is defined 'PC' must be too"
#endif
#endif // WCLI
#ifdef PS
#ifndef GRAPH
#error "If 'PS' is defined 'GRAPH' must be too"
#endif
#endif // PS
#ifdef META
#ifndef GRAPH
#error "If 'META' is defined 'GRAPH' must be too"
#endif
#endif // META
#ifdef WIRE
#ifndef GRAPH
#error "If 'WIRE' is defined 'GRAPH' must be too"
#endif
#endif // WIRE
/*
******************************************************************************
** Program Constants.
******************************************************************************
*/
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define fFalse FALSE
#define fTrue TRUE
#define szAppNameCore "Astrolog"
#define szVersionCore "7.20"
#define szVerCore "720"
#define szDateCore "April 2021"
#define szAddressCore \
"[email protected] - http://www.astrolog.org/astrolog.htm"
#define szNowCore "now"
#define szTtyCore "tty"
#define szSetCore "set"
#define szNulCore "nul"
#define szObjUnknown "???"
#define cchSzDef 80
#define cchSzMax 255
#define cchSzLine (cchSzMax*4)
#define dwCanary 0x87654321
#define nDegMax 360
#define nDegHalf 180
#define nLarge 9999999
#define nNegative -1000
#define yeaJ2G 1582
#define monJ2G mOct
#define dayJ2G1 4
#define dayJ2G2 15
#define zonLMT 24.0
#define dstAuto 24.0
#define rStarLite -1.46
#define rStarSpan 7.0
#define rStarNot 999.99
#define rSqr2 1.41421356237309504880
#define rSqr3 1.73205080756887729353
#define rPhi 1.61803398874989484820
#define rLog10 2.30258509299404568402
#define rLog101 4.61512051684125945088
#define rPi 3.14159265358979323846
#define rPi2 (rPi*2.0)
#define rPiHalf (rPi/2.0)
#define rDegMax 360.0
#define rDegHalf 180.0
#define rDegQuad 90.0
#define rDegRad (rDegHalf/rPi)
#define rMiToKm 1.609344
#define rFtToM 0.3048
#define rInToCm 2.54
#define rAUToKm 149597870.7
#define rLYToAU 63241.07708427
#define rPCToAU 206264.8062471
#define rDayInYear 365.24219
#define rEarthDist 149.59787
#define rEpoch2000 -24.736467
#define rJD2000 2451545.0
#define rAxis 23.44578889
#define rSatRingA 136780.0
#define rSatRingB 92000.0
#define rSmall (1.7453E-09)
#define rLarge 10000.0
#define rRound 0.5
#define chNull '\0'
#define chEscape '\33'
#define chBell '\7'
#define chReturn '\r'
#define chTab '\t'
#define chDelete '\b'
#define chBreak '\3'
#define chDeg2 '\260'
#define chRet 'R'
#define chRet2 'r'
#define chSep ','
#define chSep2 ';'
// Array index limits
#define objMax (cObj+1)
#define cCnstl 88
#define cZone 72
#define cSector 36
#define cPart 177
#define cWeek 7
#define cColor 16
#define cRainbow 7
#define cRay 7
#define cFont 7
#define xFont 6
#define yFont 10
#define xFontT (xFont * gi.nScaleTextT)
#define yFontT (yFont * gi.nScaleTextT)
#define xSideT (SIDESIZE * gi.nScaleTextT)
// Atlas values
#define cchSzAtl 54
#define cchSzZon 13
#define icnewMax 252
#define icnusMax 51
#define icncaMax 13
#define icnUS 234 // United States
#define icnCA 38 // Canada
#define icnFR 76 // France
#define iznMax 425
#define ilistMax 200
// Object array index values
#define cPlanet oVes
#define cThing oLil
#define oMain 10
#define oCore 21
#define cUran 9
#define cDwarf 9
#define cMoons 27
#define cCOB 5
#define cMoons2 (cMoons + cCOB)
#define cCust (cUran + cDwarf + cMoons2)
#define cStar 47
#define cuspLo (oCore+1)
#define cuspHi (cuspLo+cSign-1)
#define uranLo (cuspHi+1)
#define uranHi (uranLo+cUran-1)
#define dwarfLo (uranHi+1)
#define dwarfHi (dwarfLo+cDwarf-1)
#define moonsLo (dwarfHi+1)
#define moonsHi (moonsLo+cMoons-1)
#define cobLo (moonsHi+1)
#define cobHi (cobLo+cCOB-1)
#define starLo (cobHi+1)
#define starHi (starLo+cStar-1)
#define custLo uranLo
#define custHi cobHi
#define oNorm cobHi
#define oNorm1 starLo
// Month index values
enum _months {
mJan = 1,
mFeb = 2,
mMar = 3,
mApr = 4,
mMay = 5,
mJun = 6,
mJul = 7,
mAug = 8,
mSep = 9,
mOct = 10,
mNov = 11,
mDec = 12,
};
// Elements
enum _elements {
eFir = 0,
eEar = 1,
eAir = 2,
eWat = 3,
cElem = 4,
};
// Zodiac signs
enum _signs {
sAri = 1,
sTau = 2,
sGem = 3,
sCan = 4,
sLeo = 5,
sVir = 6,
sLib = 7,
sSco = 8,
sSag = 9,
sCap = 10,
sAqu = 11,
sPis = 12,
cSign = 12,
};
// Objects
enum _objects {
oEar = 0,
oSun = 1,
oMoo = 2,
oMer = 3,
oVen = 4,
oMar = 5,
oJup = 6,
oSat = 7,
oUra = 8,
oNep = 9,
oPlu = 10,
oChi = 11,
oCer = 12,
oPal = 13,
oJun = 14,
oVes = 15,
oNod = 16,
oSou = 17,
oLil = 18,
oFor = 19,
oVtx = 20,
oEP = 21,
oAsc = (cuspLo-1 + 1),
o2nd = (cuspLo-1 + 2),
o3rd = (cuspLo-1 + 3),
oNad = (cuspLo-1 + 4),
o5th = (cuspLo-1 + 5),
o6th = (cuspLo-1 + 6),
oDes = (cuspLo-1 + 7),
o8th = (cuspLo-1 + 8),
o9th = (cuspLo-1 + 9),
oMC = (cuspLo-1 + 10),
o11h = (cuspLo-1 + 11),
o12h = (cuspLo-1 + 12),
oVul = (uranLo + 0),
oVlk = (uranLo + 7),
oHyg = (dwarfLo + 0),
oPho = (dwarfLo + 1),
oEri = (dwarfLo + 2),
oHau = (dwarfLo + 3),
oMak = (dwarfLo + 4),
oGon = (dwarfLo + 5),
oQua = (dwarfLo + 6),
oSed = (dwarfLo + 7),
oOrc = (dwarfLo + 8),
oJuC = (cobLo + 0),
oSaC = (cobLo + 1),
oUrC = (cobLo + 2),
oNeC = (cobLo + 3),
oPlC = (cobLo + 4),
oOri = (starLo-1 + 10),
oAnd = (starLo-1 + 47),
cObj = 130,
};
// Aspects
enum _aspects {
aLen = -6, // Direction change (distance)
aAlt = -5, // Direction change (latitude)
aHou = -4, // 3D House change
aDeg = -3, // Degree change
aDir = -2, // Direction change (longitude)
aSig = -1, // Sign change
aCon = 1,
aOpp = 2,
aSqu = 3,
aTri = 4,
aSex = 5,
aInc = 6,
aSSx = 7,
aSSq = 8,
aSes = 9,
aQui = 10,
aBQn = 11,
aSQn = 12,
aSep = 13,
aNov = 14,
aBNv = 15,
aBSp = 16,
aTSp = 17,
aQNv = 18,
cAspect = 18,
cAspect2 = cAspect + aOpp,
};
// House systems
enum _housesystem {
hsPlacidus = 0,
hsKoch = 1,
hsEqual = 2,
hsCampanus = 3,
hsMeridian = 4,
hsRegiomontanus = 5,
hsPorphyry = 6,
hsMorinus = 7,
hsTopocentric = 8,
hsAlcabitius = 9,
hsKrusinski = 10,
hsEqualMC = 11,
hsSinewaveRatio = 12,
hsSinewaveDelta = 13,
hsWhole = 14,
hsVedic = 15,
hsSripati = 16,
hsHorizon = 17,
hsAPC = 18,
hsCarter = 19,
hsSunshine = 20,
hsNull = 21,
// New experimental house systems follow:
hsWholeMC = 22,
hsVedicMC = 23,
hsEqualBalanced = 24,
hsWholeBalanced = 25,
hsVedicBalanced = 26,
hsEqualEP = 27,
hsWholeEP = 28,
hsVedicEP = 29,
hsEqualVertex = 30,
hsWholeVertex = 31,
hsVedicVertex = 32,
cSystem = 33,
};
enum _progressiontype {
ptCast = 0,
ptSolarArc = 1,
ptMixed = 2,
};
// Biorhythm cycle constants
#define brPhy 23.0
#define brEmo 28.0
#define brInt 33.0
// Relationship chart modes
enum _relationshipchart {
rcNone = 0,
rcSynastry = 1,
rcComposite = 2,
rcMidpoint = 3,
rcDifference = 4,
rcBiorhythm = 5,
rcDual = -1,
rcTriWheel = -2,
rcQuadWheel = -3,
rcTransit = -4,
rcProgress = -5,
};
// Aspect configurations
enum _aspectconfigurations {
acS3 = 0, // Stellium (3 planets)
acGT = 1, // Grand Trine
acTS = 2, // T-Square
acY = 3, // Yod
acGC = 4, // Grand Cross
acC = 5, // Cradle
acMR = 6, // Mystic Rectangle
acS4 = 7, // Stellium (4 planets)
cAspConfig = 8,
};
// Aspect sorting methods
enum _aspectsorting {
asj = 0, // By power
aso = 1, // By orb (+/- merged)
asn = 2, // By orb (+/- separated)
asO = 3, // By 1st object name
asP = 4, // By 2nd object name
asA = 5, // By aspect
asC = 6, // By 1st object position
asD = 7, // By 2nd object position
asM = 8, // By midpoint
};
// Angle restrictions
enum _angles {
arAsc = 0, // Ascendant
arMC = 1, // Midheaven
arDes = 2, // Descendant
arIC = 3, // Nadir
arMax = 4,
};
// Eclipse types
enum _eclipses {
etUndefined = -1, // Not checked
etNone = 0, // No eclipse
etPenumbra = 1, // Penumbral eclipse
etPenumbra2 = 2, // Total penumbral eclipse
etPartial = 3, // Partial eclipse
etAnnular = 4, // Annular eclipse
etTotal = 5, // Total eclipse
etMax = 6,
};
// Rulership restrictions
enum _rulerships {
rrStd = 0, // Standard exoteric
rrEso = 1, // Esoteric
rrHie = 2, // Hierarchical
rrExa = 3, // Exaltation
rrRay = 4, // Ray rulership
rrMax = 5,
};
// Graphics chart modes
enum _graphicschart {
gWheel = 1,
gHouse = 2,
gGrid = 3,
gHorizon = 4,
gOrbit = 5,
gSector = 6,
gCalendar = 7,
gDisposit = 8,
gEsoteric = 9,
gAstroGraph = 10,
gEphemeris = 11,
gLocal = 12,
gTraTraGra = 13,
gTraNatGra = 14,
gSphere = 15,
gWorldMap = 16,
gGlobe = 17,
gPolar = 18,
gTelescope = 19,
gBiorhythm = 20,
#ifdef WIN
gAspect = 21,
gMidpoint = 22,
gArabic = 23,
gRising = 24,
gMoons = 25,
gTraTraTim = 26,
gTraTraInf = 27,
gTraNatTim = 28,
gTraNatInf = 29,
gSign = 30,
gObject = 31,
gHelpAsp = 32,
gConstel = 33,
gPlanet = 34,
gRay = 35,
gMeaning = 36,
gSwitch = 37,
gObscure = 38,
gKeystroke = 39,
gCredit = 40,
gMax = 41,
#endif
};
// Colors
enum _colors {
kReverse = -2,
kDefault = -1,
kBlack = 0,
kMaroon = 1,
kDkGreen = 2,
kOrange = 3,
kDkBlue = 4,
kPurple = 5,
kDkCyan = 6,
kLtGray = 7,
kDkGray = 8,
kRed = 9,
kGreen = 10,
kYellow = 11,
kBlue = 12,
kMagenta = 13,
kCyan = 14,
kWhite = 15,
kElement = 16,
kRay = 17,
kStar = 18,
kPlanet = 19,
kNull = 16,
};
// Arabic parts
enum _arabicparts {
apFor = 0,
apSpi = 1,
};
// Calculation methods
enum _calculationmethod {
cmSwiss = 0,
cmMoshier = 1,
cmJPL = 2,
cmPlacalc = 3,
cmMatrix = 4,
cmNone = 5,
cmMax = 6,
};
// Draw text formatting flags
enum _drawtext {
dtCent = 0x0, // Default: Center text at coordinates
dtLeft = 0x1, // Left justify text at X coordinate
dtTop = 0x2, // Y coordinate is top of text
dtBottom = 0x4, // Y coordinate is bottom of text
dtErase = 0x8, // Erase background behind text
dtScale = 0x10, // Scale text by -Xs character scale
dtScale2 = 0x20, // Scale text by -XS text scale