+typedef struct
+{
+ int cylinders;
+ int includedAngle;
+ int pistonAngle[12]; /* twelve cylinders should suffice... */
+ int speed; /* step size in degrees for engine speed */
+ const char *engineName; /* currently unused */
+} engine_type;
+
+static const engine_type engines[] = {
+ { 3, 0, { 0, 240, 480, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "Honda Insight" },
+ { 4, 0, { 0, 180, 540, 360, 0, 0,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "BMW M3" },
+ { 4, 180, { 0, 360, 180, 540, 0, 0,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "VW Beetle" },
+ { 5, 0, { 0, 576, 144, 432, 288, 0,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "Audi Quattro" },
+ { 6, 0, { 0, 240, 480, 120, 600, 360,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "BMW M5" },
+ { 6, 90, { 0, 360, 480, 120, 240, 600,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "Subaru XT" },
+ { 6, 180, { 0, 360, 240, 600, 480, 120,
+ 0, 0, 0, 0, 0, 0 }, 12,
+ "Porsche 911" },
+ { 8, 90, { 0, 450, 90, 180, 270, 360,
+ 540, 630, 0, 0, 0, 0 }, 15,
+ "Corvette Z06" },
+ {10, 90, { 0, 72, 432, 504, 288, 360,
+ 144, 216, 576, 648, 0, 0 }, 12,
+ "Dodge Viper" },
+ {12, 60, { 0, 300, 240, 540, 480, 60,
+ 120, 420, 600, 180, 360, 660 }, 12,
+ "Jaguar XKE" },
+};
+
+/* this define is just a little shorter way of referring to members of the
+ * table above
+ */
+#define ENG engines[e->engineType]