/*-------------------------------------------------------------------------- * defs.h * * This file contains miscellaneous definitions, many related to the * screen setup and colors available in the program. *-------------------------------------------------------------------------- */ #define WIDTH 640 /* horizontal resolution of screen */ #define HEIGHT 200 /* vertical resolution */ #define DEPTH 3 /* number of bitplanes used */ #define NUM_COLORS 8 /* number of colors available */ #define INTUITION_REV 0 /* op sys revision parameters */ #define GRAPHICS_REV 0 /* for library versions */ #define MATH_REV 0 #define MATHTRANS_REV 0 #define NORMAL_EXIT NULL #define LOOP_FOREVER while (1) #define NUM_MATRICES 6 #define YES 1 #define NO 0 #define ON 1 #define OFF 0 #define NOT_IMPLEMENTED 0 /* unimplemented features of op sys */ #define NUM_VIEWS 6 /* number of viewpoints */ #define NUM_FLYPAST_VPOINTS 16 /* number of viewpoints used in flypast */ #define AXES_LENGTH 15.0 #define ANGLE1_VIEW 0 /* positions of viewpoint */ #define ANGLE2_VIEW 1 #define ANGLE3_VIEW 2 #define FRONT_VIEW 3 #define TOP_VIEW 4 #define SIDE_VIEW 5 #define PARALLEL 0 /* type of view perspective */ #define WIDE_ANGLE 1 #define TELEPHOTO 2 #define MIN_ANGLE_CHANGE 5.0 /* minimum angle movement for */ /* animation */ #define TELEPHOTO_APERTURE 0.2 /* used in setting the aperture */ #define WIDE_ANGLE_APERTURE 1.0 /* for perspective viewing */ #define SET_ALL_JOINTS 0 /* type of goal */ #define ROTATE 1 #define DISTAL 2 #define START 0 /* color options */ #define SET1 1 #define SET2 2 #define SET3 3 #define SCREEN_SCALE_X 2.3 /* adjustments for different X Y */ /* screen pixel width (640x200) */ #define SCREEN_FILL_X 322.0 /* parameters to center the current */ #define SCREEN_FILL_Y 140.0 /* display on the screen */ #define SCREEN_START_X 154 #define SCREEN_START_Y 25 #define SCREEN_CENTER_X 315 #define SCREEN_CENTER_Y 95 #define WIRE_FRAME 0 /* type of arm rendering */ #define SOLID_VIEW 1 #define X_SHOULDER_ANGLE 0 /* Intuition gadget ID's */ #define Y_SHOULDER_ANGLE 1 #define Z_SHOULDER_ANGLE 2 #define X_WRIST_ANGLE 3 #define Y_WRIST_ANGLE 4 #define Z_WRIST_ANGLE 5 #define X_ELBOW_ANGLE 6 #define REQ_SHOULDER_CANCEL 7 #define REQ_SHOULDER_TEST 8 #define REQ_SHOULDER_OK 9 #define REQ_WRIST_CANCEL 10 #define REQ_WRIST_TEST 11 #define REQ_WRIST_OK 12 #define REQ_ELBOW_CANCEL 13 #define REQ_ELBOW_TEST 14 #define REQ_ELBOW_OK 15 #define ANIM_INFO 16 #define NO_CHANGE 17 #define ANIM_CANCEL_SET_YES 18 #define ANIM_CANCEL_SET_NO 19 #define ANIM_CANCEL_ROT_YES 20 #define ANIM_CANCEL_ROT_NO 21 #define ROT_INFO 22 #define SH 0 /* SHoulder */ #define EL 1 /* ELbow */ #define WR 2 /* WRist */ #define MAX_SH_X 90 /* max min degrees of rotation */ #define MIN_SH_X -90 /* for shoulder, wrist and */ #define MAX_SH_Y 45 /* elbow joints */ #define MIN_SH_Y -90 #define MAX_SH_Z 60 #define MIN_SH_Z -60 #define MAX_WR_X 45 #define MIN_WR_X -90 #define MAX_WR_Y 30 #define MIN_WR_Y -30 #define MAX_WR_Z 90 #define MIN_WR_Z -30 #define MAX_EL_X 0 #define MIN_EL_X -145 #define TO_ORIGIN 0 /* translate to the origin */ #define BACK 1 /* translate back */ #define TEMP 3 #define COLOR0 0 /* color registers */ #define COLOR1 1 #define COLOR2 2 #define COLOR3 3 #define COLOR4 4 #define COLOR5 5 #define COLOR6 6 #define COLOR7 7 #define GREY 0x666 /* hex RGB color values */ #define RED 0x700 /* 4x4x4 bits for RxGxB values */ #define WHITE 0xba9 #define BLUE 0x239 #define ORANGE 0xd55 /* default color settings */ #define GREEN 0x564 #define PURPLE 0xa8e /* the original meaning of the colors */ #define DARK_BLUE 0x215 /* is lost - ie. BLUE may not be blue */ #define GREY1 0xb87 #define RED1 0x800 #define WHITE1 0xb9b #define BLUE1 0xa33 /* set1 color settings */ #define ORANGE1 0x673 #define GREEN1 0x050 #define PURPLE1 0xc00 #define DARK_BLUE1 0x000 #define GREY2 0xedd #define RED2 0x900 #define WHITE2 0xeab #define BLUE2 0xe00 /* set2 color settings */ #define ORANGE2 0xb00 #define GREEN2 0xf00 #define PURPLE2 0xd00 #define DARK_BLUE2 0x000 #define GREY3 0x020 #define RED3 0x504 #define WHITE3 0xd85 #define BLUE3 0x007 /* set3 color settings */ #define ORANGE3 0x050 #define GREEN3 0x405 #define PURPLE3 0xd40 #define DARK_BLUE3 0x000 #define BLACK 0x000 #define BACKGROUND_COLOR GREY