Fix cosmetic oob hacks (#2211)

This commit is contained in:
Garrett Cox 2022-12-20 15:21:00 -06:00 committed by GitHub
parent 4eee417520
commit 95f1ba7202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 143 additions and 136 deletions

View file

@ -759,8 +759,15 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
1 * -(play->state.frames * 2), 32, 32));
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD);
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
Color_RGB8 color = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", (Color_RGB8) { 255, 70, 50 });
gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255);
gSPGrayscale(POLY_XLU_DISP++, true);
}
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
gSPGrayscale(POLY_XLU_DISP++, false);
}
CLOSE_DISPS(play->state.gfxCtx);
}