CHud::Draw - removed render states, readded hud toogle with second controller

This commit is contained in:
Sergeanur 2019-10-07 15:06:30 +03:00
parent 577189c1f2
commit 568bdcfd74

View File

@ -107,14 +107,9 @@ WRAPPER void CHud::Draw(void) { EAXJMP(0x5052A0); }
#else #else
void CHud::Draw() void CHud::Draw()
{ {
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); // disable hud via second controller
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); if (CPad::GetPad(1)->GetStartJustDown())
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); m_Wants_To_Draw_Hud = !m_Wants_To_Draw_Hud;
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void*)rwTEXTUREADDRESSMIRROR);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)rwSHADEMODEFLAT);
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
if (CReplay::IsPlayingBack()) if (CReplay::IsPlayingBack())
return; return;