mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-30 13:04:15 +01:00
fancy HUD.TXD reloader
TODO: make optional with defines, also add more reload options
This commit is contained in:
parent
3e75de9709
commit
46c6b0d29d
@ -385,6 +385,11 @@ DebugMenuPopulate(void)
|
||||
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
||||
|
||||
DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
|
||||
DebugMenuAddCmd("Reload", "FONTS.TXD", NULL);
|
||||
DebugMenuAddCmd("Reload", "FRONTEN1.TXD", NULL);
|
||||
DebugMenuAddCmd("Reload", "FRONTEN2.TXD", NULL);
|
||||
|
||||
extern bool PrintDebugCode;
|
||||
extern int16 DebugCamMode;
|
||||
DebugMenuAddVarBool8("Cam", "Use mouse Cam", &CCamera::m_bUseMouse3rdPerson, nil);
|
||||
|
@ -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;
|
||||
|
@ -124,6 +124,7 @@ public:
|
||||
static void Draw();
|
||||
static void DrawAfterFade();
|
||||
static void GetRidOfAllHudMessages();
|
||||
static void ReloadTXD();
|
||||
static void Initialise();
|
||||
static void ReInitialise();
|
||||
static void SetBigMessage(wchar *message, int16 style);
|
||||
|
Loading…
Reference in New Issue
Block a user