/* The routines in this file are copyright (c) 1987 by Helene (Lee) Taran.
 * Permission is granted for use and free distribution as long as the
 * original author's name is included with the code.
 */

#ifndef SPLINE_H
#define SPLINE_H
#include <stdio.h>
#include <math.h>
#include <intuition/intuition.h>
#include "popmenu.h"
#include "bezier.h"
#include "dlist.h"

#define INTERLACED_VIEW

#ifdef  INTERLACED_VIEW
#define VIEWMODE  (HIRES | INTERLACE)
#define XADJUSTMENT 2
#define YADJUSTMENT 2
#else
#define YADJUSTMENT 1
#ifdef  HIRESVIEW
#define VIEWMODE  HIRES
#define XADJUSTMENT 2
#else
#define VIEWMODE 0
#define XADJUSTMENT 1
#endif
#endif

#define SCREEN_WIDTH    (XADJUSTMENT * 320)
#define SCREEN_HEIGHT   (YADJUSTMENT * 200)

#define CONTROL_RADIUS   4
#define WINDOW_LEFT 0
#define WINDOW_TOP 11
#define WINDOW_HEIGHT (SCREEN_HEIGHT - WINDOW_TOP)   
#define WINDOW_WIDTH  SCREEN_WIDTH

#define DEPTH  2     /* Number of bit-planes to use for color definition */
#define COLORCOUNT (1L<<DEPTH)   /* Number of colors that we can use     */

#define DETAILPEN    0l  /* color register for details  & background */
#define ERASE        0l  /* background color */
#define BLOCKPEN     1l  /* color register for filling large areas   */
#define OUTLINEPEN   2l  /* color register for outlined areas */
#define CURVECOLOR   3l  /* color register for drawing curve */
#define AFRAME_COLOR 2l  /* color register for drawing construction lines */

#define INTUITION     1
#define GRAPHICS      2
#define SCREEN        4
#define WINDOW        8
#define POPUP_MENU   16
#define MENU_PACKAGE 32
#define LAYERS       64

/* The following constants are used to select/identify a command in
 * in the Point Menu 
 */
#define ADD_AFTER     1
#define ADD_BEFORE    2
#define MOVE_POINT    3
#define REMOVE_POINT  4

/* The following constants are used to select/identify a command in 
 * the Curve Menu
 */
#define OPENB_NATURAL 1
#define OPENB_TRIPLE  2
#define OPEN_INTRPL   3
#define CLOSEDB       4
#define CLOSED_INTRPL 5
#define REDRAW        6
#define TOGGLEAFRAME  7
#define QUIT          8

#define INTUITION_VERSION 0
#define GFX_VERSION       0
#define LAYERS_VERSION    0

#define POINT(list_element) ((REAL_POINT *)list_element->contents)

#define MAXG             34  /* maximum number of points for interpolation */
                             /* NOTE: you don't want to change this value! */
#endif
