MTrop
Member
Posts: 267
Registered: 12-05 |
Maes said:
Ports like Boom do alter the relative order of certain lumps in memory during WAD loading time, and coalesce blocks of similar-purpose lumps together e.g. for being able to load sprites from a PWAD, they must all be in one contiguous block, as do flats, so any additional sprite block present in PWADs must be merged with base ones, overwriting some in the process (NB overwriting occurs only at the pointer/index level!). In addition, they look for special markers e.g. SS_START and SS_END (Deutex markers for sprite blocks) and FF_START/FF_END for flats, in order to identify any and all blocks of additional sprites.
So, in order for me to write something to suit your use case, what would need to be indexed in memory, pointing to WADs? So far, I think it is:
- Maps
- Sprites
- Textures
- Flats
- Other (Globals, Sounds, Palettes, etc.)
Which are the types that absolutely need to be sorted? The textures I think, at the very least, should be sorted, since Doom has that "first alphabetical texture is invalid" idiosyncrasy. Sprites and flats as well, I believe.
I'll probably make it dynamic as well (add or remove Patch WADs at will), but that will be slightly more memory-intense.
|