#ifndef TRULLA_H #define TRULLA_H #include "window.h" #include "tr2robot.h" // Symbolic Constants #define MAXWGT 15 #define OKAY 1 #define BADEXIT 1 #define OBSTACLE 'x' #define TRUE 1 #define FALSE 0 // Function Prototypes void Trulla(char *name); void MoveLeft (Window *win); void MoveRight (Window *win); void MoveUp (Window *win); void MoveDown (Window *win); int DrawCurrentLocation ( Window *win, LOCATION * currLocInGridels ); void DrawPastMoves(Window* win); /* Function InitializeDisplay is used to initialize the graphics system and variables needed to display the workspace grid. Declare and set variable showGrid (see below) to TRUE (1) then call this function if you wish the workspace grid to display. If you do not wish the workspace grid to display, do not call this function; however, you must still declare showGrid and set it to FALSE (0). */ void InitializeDisplay(Window *win); /* showGrid should be set to 1 to display the workspace grid. It should be set to 0 to prevent any workspace display. If it is set to 1, you must be sure to call function InitializeDisplay afterwards. */ extern int showGrid; /* Gridel Structure This structure contains the propagation values for a cell in the workspace grid. During the loading of the workspace file, an array of this structure is allocated, one for each cell in the workspace grid. */ typedef struct { unsigned int vert_hist [2]; int xloc; int yloc; int normal; // char normal; float s_dist; float t_dist; int r_weight; int region; int delx; int dely; int xgoal; int ygoal; } GRIDEL; typedef struct MVstruct{ float x; float y; struct MVstruct *next; } MOVEMENT; typedef struct { int nohits; } OBST; typedef struct { float x; float y; } DOT; #endif