2 MAND.H -- The Constants
3 Mandelbrot Self-Squared Dragon Generator
4 For the Commodore Amiga
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
20 /*-------------------*/
21 /* Lots of includes! */
23 #include <aros/oldprograms.h>
29 #define KLUDGE_INT int
34 #define KLUDGE_INT float
37 #define SPDiv(a,b) ((b) / (a))
40 #define SPFlt(a) ((float)(a))
43 #define SPSub(a,b) ((b) - (a))
46 #define SPAdd(a,b) ((a) + (b))
49 #define SPMul(a,b) ((a) * (b))
52 #define SPNeg(a) (-(a))
55 #define SPFix(a) ((LONG)(a))
58 #define SPFieee(a) (a)
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>
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
103 /*---------------------------------*/
104 /* Fast-Floating-Point Definitions */
122 extern int SPSincos();
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 */
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
169 void CloseDisplay(void);
170 void SetPresets(int preset
);
172 void v_pos_line(int l
);
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();