+struct state {
+ Display *dpy;
+ Window window;
+
+ Pixmap dbuf, stars_mask;
+ Colormap cmap;
+ unsigned int default_fg_pixel;
+ GC draw_gc, erase_gc, tunnelend_gc, stars_gc, stars_erase_gc;
+
+ int ncolors, nr_ground_colors, nr_wall_colors, nr_bonus_colors;
+ XColor ground_colors[MAX_COLORS], wall_colors[MAX_COLORS];
+ XColor bonus_colors[MAX_COLORS];
+ GC ground_gcs[MAX_COLORS], wall_gcs[MAX_COLORS], bonus_gcs[MAX_COLORS];
+
+ int be_wormy;
+
+ int width, height;
+ int delay;
+
+ int smoothness;
+ int verbose_flag;
+ int wire_flag;
+ int terrain_flag;
+ int widening_flag;
+ int bumps_flag;
+ int bonuses_flag;
+ int crosshair_flag;
+ int psychedelic_flag;
+
+ double maxspeed;
+
+ double thrust, gravity;
+
+ double vertigo;
+ double curviness;
+ double twistiness;
+
+ double pos;
+ double speed;
+ double accel;
+ double step;
+
+ int direction;
+
+ int pindex, nearest;
+ int flipped_at;
+ int xoffset, yoffset;
+
+ int bonus_bright;
+ int wire_bonus;
+
+ double speed_bonus;
+
+ int spin_bonus;
+ int backwards_bonus;
+
+ double sintab[ROTS], costab[ROTS];
+
+ int orientation;
+
+ int terrain[TERRAIN_LENGTH][TERRAIN_BREADTH];
+ double xcurvature[TERRAIN_LENGTH];
+ double ycurvature[TERRAIN_LENGTH];
+ double zcurvature[TERRAIN_LENGTH];
+ int wideness[TERRAIN_LENGTH];
+ int bonuses[TERRAIN_LENGTH];
+ int xvals[TERRAIN_LENGTH][TERRAIN_BREADTH];
+ int yvals[TERRAIN_LENGTH][TERRAIN_BREADTH];
+ double worldx[TERRAIN_LENGTH][TERRAIN_BREADTH];
+ double worldy[TERRAIN_LENGTH][TERRAIN_BREADTH];
+ int minx[TERRAIN_LENGTH], maxx[TERRAIN_LENGTH];
+ int miny[TERRAIN_LENGTH], maxy[TERRAIN_LENGTH];
+
+ int total_nframes;
+ int nframes;
+ double fps;
+ double fps_start, fps_end;
+ struct timeval start_time;
+
+ int rotation_offset;
+ int jamming;
+};
+