Danukem, on 14 August 2022 - 12:17 PM, said:
If it's a 1:1 change then just swap the art tile for a different one in the .ART file.
Out of curiosity I was wondering exactly what method the source uses to do this, I believe it's this in sbar.cpp:
int32_t asprites[MAX_WEAPONS] = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO,
RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO,
TRIPBOMBSPRITE, FREEZEAMMO+1, HBOMBAMMO, GROWAMMO, FLAMETHROWERAMMO+1,
};
So it is literally those tile names. Theoretically you could `dynamicremap` those tiles and create your own ammo pickup actors, if the
only thing on the HUD you wanted to change was what ammo sprite it displayed. Otherwise as you said, sooner or later you're probably gonna want to remake the HUD entirely. For example any weapon taking the place of the Boot can never display ammo because it's hardcoded to -1, and later on when the sprite is rendered to the screen, it checks and fails out for any tile ID less than 0.