mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 11:44:09 +00:00
fancy HUD.TXD reloader
TODO: make optional with defines, also add more reload options
This commit is contained in:
parent
3e75de9709
commit
46c6b0d29d
3 changed files with 28 additions and 0 deletions
|
@ -1476,6 +1476,28 @@ void CHud::GetRidOfAllHudMessages()
|
|||
}
|
||||
}
|
||||
|
||||
void CHud::ReloadTXD()
|
||||
{
|
||||
for (int i = 0; i < NUM_HUD_SPRITES; ++i) {
|
||||
Sprites[i].Delete();
|
||||
}
|
||||
|
||||
int HudTXD = CTxdStore::FindTxdSlot("hud");
|
||||
CTxdStore::RemoveTxdSlot(HudTXD);
|
||||
|
||||
debug("Reloading HUD.TXD...\n");
|
||||
|
||||
HudTXD = CTxdStore::AddTxdSlot("hud");
|
||||
CTxdStore::LoadTxd(HudTXD, "MODELS/HUD.TXD");
|
||||
CTxdStore::AddRef(HudTXD);
|
||||
CTxdStore::PopCurrentTxd();
|
||||
CTxdStore::SetCurrentTxd(HudTXD);
|
||||
|
||||
for (int i = 0; i < NUM_HUD_SPRITES; i++) {
|
||||
Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask);
|
||||
}
|
||||
}
|
||||
|
||||
void CHud::Initialise()
|
||||
{
|
||||
m_Wants_To_Draw_Hud = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue