Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MTEMP.TMP map header file + related CA_LoadFile changes #63

Closed
wants to merge 3 commits into from

Conversation

NY00123
Copy link
Collaborator

@NY00123 NY00123 commented Sep 11, 2024

No description provided.

The Catacomb 3-D sources and reconstructed Keen 4-6 v1.4-5 sources,
along with Blake Stone sources, show no use of the function, while
the known uses in the sources for the Catacomb Adventure Series
and Wolfenstein 3D ignore the returned value.
By calling CAL_LoadFile_Int directly, it should be possible
to open a file without adjusting its file extension.
MTEMP.TMP was the file generated by TED5.EXE for Carmack-compressed files,
while MAPHEAD.EXT would be used for maps not going through that phase.
The situation possibly changed in Wolfenstein 3D shareware v1.1,
using MAPHEAD.EXT with Carmack compression altogether.
Due to the lack of awareness for years, MAPHEAD.EXT had been commonly used
for Keen 4-6 map editing with Carmack compression, and the open-source release
of Keen Dreams from 2014 similarly used MAPHEAD.KDR with Huffman compression.
For purposes of backwards compatibility, Omnispeak still accepts MAPHEAD.EXT.
@sulix
Copy link
Owner

sulix commented Sep 12, 2024

I'm definitely happy to accept the first two fixes, but I don't like the MTEMP.TMP name, for a few reasons:

  1. The rest of the Keen community is using MAPHEAD.CKx for this. Changing this would break non-TED5 map editors, none of which generate MTEMP.TMP. There's also MAPTHEAD.CKx for the uncompressed maps, though it's in a different format, and maybe TED5 is generating an uncompressed MAPHEAD.CKx as well.
  2. It's clear from the TED5 source that this is intended as a temporary file, not as the real filename. I'd be happy to accept supporting parsing the generated CKxMHEAD.OBJ, if we really want perfect TED5 compatibility.
  3. It doesn't include the episode number, so multiple episodes couldn't coexist in the same directory (which, if nothing else, it how I usually run Omnispeak).

My feeling is that the ultimate correct solution here is to make all of the other filenames variables in EPISODE.CKx. This would allow individual mods/users to use MTEMP.TMP if they prefer, or to stick with MAPHEAD.CKx, or even MAPSHEAD.CKx (which seems to be, from an unused variable in the TED5 code, the originally intended name here).

(Of course, I'd be happy to support MAPTEMP/MAPTHEAD at some point, too, for TED5 compatibility.)

The LoadFile and AdjustExtension changes are fine, though.

@NY00123
Copy link
Collaborator Author

NY00123 commented Sep 14, 2024

I think that I'll close this for now and let you decide if to cherry-pick anything. I'm not sure the CA_LoadFile split will be needed outside of my merge request, especially in case all filenames will eventually be define-able via EPISODE.CKx.

My PR was meant to add MTEMP.TMP as an option while preserving support for MAPHEAD.CKx.

As far as I know, MAPTHEAD.CKx was intended for internal use by TED5, while MAPHEAD.CKx would be used by the game in case maps were not using more than RLEW for compression (at least before Wolf3D shareware v1.1). Bio Menace (checked with the freeware version) uses MAPHEAD.BMx with MAPTEMP.BMx. There are files letting you use TED5 with Bio Menace. The files GAMEMAPS.BMx also exists, but they're practically unused. https://moddingwiki.shikadi.net/wiki/GameMaps_Format

If MAPSHEAD.CKx hadn't had a known use so far, I'm not sure it's necessary to support the name separately. MTEMP.TMP was clearly generated by TED5 and could be used as-is, albeit it's not impossible the sole user of MTEMP.TMP for now, as far as it comes to released modifications, was me. The released files for "Keen Dreams - Unofficial Tech Demo" (2015, within an internal subdir) and "NY00123's tests level" (2017) should include MTEMP.TMP files. But I think that even the tests level will not work under Omnispeak without making a source mod.

So far, I've usually had each game/mod in a separate directory, so you've brought a good point about the file extensions letting you have all episodes' data in the same directory for Omnispeak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants