forwarding a radium compilation fix.
[AROS-Contrib.git] / fish / mandel / mand.h
blob5ba16954d871faca4e04361c30135dc1361ec6c8
1 /*
2 MAND.H -- The Constants
3 Mandelbrot Self-Squared Dragon Generator
4 For the Commodore Amiga
5 Version 1.00
7 Accompanies MAND.C
9 Copyright (c) 1985, Robert S. French
10 Placed in the Public Domain
12 Assorted Goodies and Intuition-stuff by =RJ Mical= 1985
14 This program may be distributed free of charge as long as the above
15 notice is retained.
20 /*-------------------*/
21 /* Lots of includes! */
23 #include <aros/oldprograms.h>
25 #define USE_MATHFFP 0
27 #if USE_MATHFFP
29 #define KLUDGE_INT int
31 #else
33 #undef KLUDGE_INT
34 #define KLUDGE_INT float
36 #undef SPDiv
37 #define SPDiv(a,b) ((b) / (a))
39 #undef SPFlt
40 #define SPFlt(a) ((float)(a))
42 #undef SPSub
43 #define SPSub(a,b) ((b) - (a))
45 #undef SPAdd
46 #define SPAdd(a,b) ((a) + (b))
48 #undef SPMul
49 #define SPMul(a,b) ((a) * (b))
51 #undef SPNeg
52 #define SPNeg(a) (-(a))
54 #undef SPFix
55 #define SPFix(a) ((LONG)(a))
57 #undef SPFieee
58 #define SPFieee(a) (a)
60 #endif
62 #include <exec/types.h>
63 #include <exec/tasks.h>
64 #include <exec/libraries.h>
65 #include <exec/devices.h>
66 #include <devices/keymap.h>
67 #include <graphics/copper.h>
69 #include <graphics/display.h>
71 #include <graphics/gfxbase.h>
72 #include <graphics/text.h>
73 #include <graphics/view.h>
74 #include <graphics/gels.h>
75 #include <graphics/regions.h>
76 #include <hardware/blit.h>
77 #include <intuition/intuition.h>
78 #include <intuition/intuitionbase.h>
79 #include <stdio.h>
80 #include <ctype.h>
81 #include <stdlib.h>
82 #include <string.h>
84 /*-------------------*/
85 /* Misc. definitions */
86 #define VERSION "2.00"
88 #define F_INTUITION 0x000001
89 #define F_GRAPHICS 0x000002
90 #define F_MATH 0x000004
91 #define F_MATHTRANS 0x000008
92 #define F_CONSOLE 0x000010
93 #define F_COLORTAB 0x000020
94 #define F_SETSTORE 0x000040
95 #define F_DOS 0x000080
97 #define EVER ;;
98 #define MAXX 640
99 #define MAXY 400
100 #define MAXMY 100
101 #define STARTY 0
103 /*---------------------------------*/
104 /* Fast-Floating-Point Definitions */
107 extern int SPFix();
108 extern int SPFlt();
109 extern int SPCmp();
110 extern int SPTst();
111 extern int SPAbs();
112 extern int SPNeg();
113 extern int SPAdd();
114 extern int SPSub();
115 extern int SPMul();
116 extern int SPDiv();
118 extern int SPAtan();
119 extern int SPSin();
120 extern int SPCos();
121 extern int SPTan();
122 extern int SPSincos();
123 extern int SPSinh();
124 extern int SPCosh();
125 extern int SPTanh();
126 extern int SPExp();
127 extern int SPLog();
128 extern int SPPow();
129 extern int SPSqrt();
130 extern int SPTieee();
131 extern int SPFieee();
134 #define TOPW2 w2->BorderTop
135 #define BOTTOMW2 (w2->Height - w2->BorderBottom)
136 #define LEFTW2 w2->BorderLeft
137 #define RIGHTW2 (w2->Width - w2->BorderRight)
140 /* === these definitions are for the color_mode variable ================== */
141 #define NOT_HOLDANDMODIFY 0x0001
142 #define INTERLACE_MODE 0x0002
143 #define HIRES_MODE 0x0004
145 /* === these definitions are for the menu strips ========================== */#define ITEM_HEIGHT 10
146 #define MENU_OPTIONS 0 /* first menu */
147 #define MENU_ZOOM 1 /* next menu */
148 #define MENU_COUNT 2
150 /* for the OPTIONS Menu ... */
151 #define OPTIONS_WIDTH 176
152 #define OPTIONS_STOP 0
153 #define OPTIONS_QUARTER 1
154 #define OPTIONS_FULL 2
155 #define OPTIONS_GENERATE 3
156 #define OPTIONS_CLOSE 4
157 #define OPTIONS_COUNT 5
159 /* for the ZOOM Menu ... */
160 #define ZOOM_WIDTH 174
161 #define ZOOM_SETCENTER 0
162 #define ZOOM_SIZEBOX 1
163 #define ZOOM_ZOOMIN 2
164 #define ZOOM_ZOOMIN10 3
165 #define ZOOM_ZOOMOUT2 4
166 #define ZOOM_ZOOMOUT10 5
167 #define ZOOM_COUNT 6
169 void CloseDisplay(void);
170 void SetPresets(int preset);
171 void v_flush(void);
172 void v_pos_line(int l);
173 void ill_cmd(void);
174 int gen_mand(void);
175 int disp_mand(void);
176 void init_colors(void);
177 int open_winds(void);
178 void init_cincr(void);
179 void init_c7rot(void);
180 void Information(SHORT page);
181 void DrawZoomCenter(void);
182 void DrawZoomBox(void);
183 void RecalcZoomBox(void);
184 void ZoomAlongDarling(KLUDGE_INT rzoom, KLUDGE_INT izoom);
185 void AvailableCommands();