- fputc((tape.length >> 24) & 0xff,file);
- fputc((tape.length >> 16) & 0xff,file);
- fputc((tape.length >> 8) & 0xff,file);
- fputc((tape.length >> 0) & 0xff,file);
+ fputc((tape.date >> 24) & 0xff, file);
+ fputc((tape.date >> 16) & 0xff, file);
+ fputc((tape.date >> 8) & 0xff, file);
+ fputc((tape.date >> 0) & 0xff, file);
+
+ fputc((tape.length >> 24) & 0xff, file);
+ fputc((tape.length >> 16) & 0xff, file);
+ fputc((tape.length >> 8) & 0xff, file);
+ fputc((tape.length >> 0) & 0xff, file);
+
+ fputc(store_participating_players, file);
+
+ for(i=0; i<TAPE_HEADER_UNUSED; i++) /* set unused header bytes to zero */
+ fputc(0, file);
+
+ fputs("BODY", file); /* chunk identifier for file body */
+ chunk_length = (num_participating_players + 1) * tape.length;
+
+ fputc((chunk_length >> 24) & 0xff, file);
+ fputc((chunk_length >> 16) & 0xff, file);
+ fputc((chunk_length >> 8) & 0xff, file);
+ fputc((chunk_length >> 0) & 0xff, file);