/* routines in "inform.c", since they are tied up with ICL */
/* settings and are very host OS-dependent. */
/* */
-/* Part of Inform 6.40 */
+/* Part of Inform 6.41 */
/* copyright (c) Graham Nelson 1993 - 2022 */
/* */
/* Inform is free software: you can redistribute it and/or modify */
}
/* ------------------------------------------------------------------------- */
-/* Final assembly and output of the story file/module. */
+/* Final assembly and output of the story file. */
/* ------------------------------------------------------------------------- */
FILE *sf_handle;
if (!glulx_mode) {
/* The checksum is the unsigned sum mod 65536 of the bytes in the
- story file from 0x0040 (first byte after header) to the end.
-
- The link data does not contribute to the checksum of a module. */
+ story file from 0x0040 (first byte after header) to the end. */
checksum_low_byte += c;
if (checksum_low_byte>=256)
/* Enter the length information into the header. */
length=((int32) Write_Strings_At) + static_strings_extent;
- if (module_switch) length += link_data_size +
- zcode_backpatch_size +
- zmachine_backpatch_size;
while ((length%length_scale_factor)!=0) { length++; blanks++; }
length=length/length_scale_factor;
/* Set the type and creator to Andrew Plotkin's MaxZip, a popular
Z-code interpreter on the Macintosh */
- if (!module_switch) fsetfileinfo(new_name, 'mxZR', 'ZCOD');
+ fsetfileinfo(new_name, 'mxZR', 'ZCOD');
#endif
/* (1) Output the paged memory. */
size_before_code = size;
j=0;
- if (!module_switch)
for (i=0; i<zcode_backpatch_size; i=i+3)
{ int long_flag = TRUE;
offset
size++;
}
- /* (5) Output the linking data table (in the case of a module). */
-
- if (module_switch)
- for (i=0; i<link_data_size; i++)
- sf_put(link_data_area[i]);
-
- if (module_switch)
- { for (i=0; i<zcode_backpatch_size; i++)
- sf_put(zcode_backpatch_table[i]);
- for (i=0; i<zmachine_backpatch_size; i++)
- sf_put(zmachine_backpatch_table[i]);
- }
+ /* (5) When modules existed, we output link data here. */
/* (6) Output null bytes to reach a multiple of 0.5K. */
}
#endif
#ifdef MAC_FACE
- if (module_switch)
- InformFiletypes (new_name, INF_MODULE_TYPE);
- else
- InformFiletypes (new_name, INF_ZCODE_TYPE);
+ InformFiletypes (new_name, INF_ZCODE_TYPE);
#endif
}
/* Set the type and creator to Andrew Plotkin's MaxZip, a popular
Z-code interpreter on the Macintosh */
- if (!module_switch) fsetfileinfo(new_name, 'mxZR', 'ZCOD');
+ fsetfileinfo(new_name, 'mxZR', 'GLUL');
#endif
checksum_long = 0;
if (uses_float_features) {
VersionNum = 0x00030102;
}
- if (uses_extundo_features) {
+ if (uses_double_features || uses_extundo_features) {
VersionNum = 0x00030103;
}
size_before_code = size;
j=0;
- if (!module_switch)
for (i=0; i<zcode_backpatch_size; i=i+6) {
int data_len;
int32 v;
}
#endif
#ifdef MAC_FACE
- if (module_switch)
- InformFiletypes (new_name, INF_MODULE_TYPE);
- else
- InformFiletypes (new_name, INF_ZCODE_TYPE);
+ InformFiletypes (new_name, INF_GLULX_TYPE);
#endif
}