Hendricks266, on 15 September 2021 - 05:31 PM, said:
The engine loads TILESXYZ.ART files in ascending numerical order until one is absent, then it stops there. If you don't have TILES020 through 022 present, it won't even try loading 023. If you want to keep compatibility with Atomic GRPs, which don't have those files, I would recommend using this def syntax:
artfile { file "whatever.art" }
This is wrong for current eduke32 revisions, and also going back at least 5 years.
//
// loadpics
//
int32_t artLoadFiles(const char *filename, int32_t askedsize)
{
Bstrncpyz(artfilename, filename, sizeof(artfilename));
Bmemset(&tilesiz[0], 0, sizeof(vec2_16_t) * MAXTILES);
Bmemset(picanm, 0, sizeof(picanm));
for (auto &rot : rottile)
rot = { -1, -1 };
// artsize = 0;
for (int tilefilei=0; tilefilei<MAXARTFILES_BASE; tilefilei++)
artReadIndexedFile(tilefilei);
Bmemset(gotpic, 0, sizeof(gotpic));
//cachesize = min((int32_t)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
g_vm_size = (Bgetsysmemsize() <= (uint32_t)askedsize) ? (int32_t)((Bgetsysmemsize() / 100) * 60) : askedsize;
zpl_virtual_memory vm = Xvm_alloc(nullptr, g_vm_size);
g_vm_data = vm.data;
g_vm_size = vm.size;
g_cache.initBuffer((intptr_t) g_vm_data, g_vm_size);
artUpdateManifest();
artfil = buildvfs_kfd_invalid;
artfilnum = -1;
artfilplc = 0L;
return 0;
}
The engine will iterate over all indices from 0 to 199 (MAXARTFILES_BASE is 200) and will not break at any gap. This is easily verified by taking any regular ART file and renaming it to something like TILES170.ART. The tiles within will appear at the same indices as if the file was named TILES023.ART for instance.
In fact, in AMC we've been using this for a few years to separate episode 5 art from the episode 4 art.