Skip to content

Engine: Extend mapinfo DEF command to support mapart token

Dino Bollinger requested to merge dibollinger/eduke32:mapinfo_mapart into master

Mods like Alien Armageddon have recently begun using mapart to make "skins" for actors without changing the code, and to override textures, and have run into the issue where they need to duplicate the ART files for each map that uses the same tiles. This can bloat the filesize unnecessarily.

This MR extends the existing mapinfo DEF command to support the existing per-map ART file system, by making it possible to specify a custom path, instead of assuming it to have the same name as the map file. This allows sharing the same per-map art between multiple levels, and moving the art into a separate folder.

This MR also does some refactoring to the maphack loading in savegames, to reduce redundancy.

Usage:

mapinfo
{
    mapmd4 <md4sum>
    mapart "mapart/testart_XX.ART"
}

The specified path must end with the suffix "_XX.ART" (case-insensitive).

The actual files need to be numbered from "_00.ART" to "_19.ART", as is the case with per-map art currently. Just like with maphacks, an md4 sum is required.

Edit: Also, both mapart and mapinfo is defined on the engine side, so that shouldn't be a problem either.

Edited by Dino Bollinger

Merge request reports