Add hilite setup calls around all custom GI draws (#5043)

This commit is contained in:
Archez 2025-02-12 15:32:28 -05:00 committed by GitHub
parent 135c2e8217
commit 266792599e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 25 additions and 1 deletions

View File

@ -18,6 +18,8 @@ void ShuffleFairies_DrawRandomizedItem(EnElf* enElf, PlayState* play) {
}
Matrix_Push();
Matrix_Scale(37.5, 37.5, 37.5, MTXMODE_APPLY);
func_8002EBCC(&enElf->actor, play, 0);
func_8002ED80(&enElf->actor, play, 0);
EnItem00_CustomItemsParticles(&enElf->actor, play, randoGetItem);
GetItemEntry_Draw(play, randoGetItem);
Matrix_Pop();
@ -404,4 +406,4 @@ void Rando::StaticData::RegisterFairyLocations() {
locationTable[RC_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY] = Location::Fairy(RC_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY, RCQUEST_MQ, RCAREA_BOTTOM_OF_THE_WELL, SCENE_BOTTOM_OF_THE_WELL, TWO_ACTOR_PARAMS(0x1000, -1458), "MQ Basement Sun's Song Fairy", "MQ Basement Sun's Song Fairy", RHT_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY, SpoilerCollectionCheck::RandomizerInf(RAND_INF_BOTTOM_OF_THE_WELL_MQ_BASEMENT_SUN_FAIRY));
}
static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFairyLocations);
static RegisterShipInitFunc initFunc(Rando::StaticData::RegisterFairyLocations);

View File

@ -548,6 +548,8 @@ extern "C" {
Matrix_Push();
Matrix_Scale(30.0, 30.0, 30.0, MTXMODE_APPLY);
func_8002EBCC(actor, play, 0);
func_8002ED80(actor, play, 0);
EnItem00_CustomItemsParticles(actor, play, randoItem);
GetItemEntry_Draw(play, randoItem);

View File

@ -381,6 +381,7 @@ void EnExItem_DrawRandomizedItem(EnExItem* enExItem, PlayState* play) {
if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0)) {
randoGetItem = GET_ITEM_MYSTERY;
}
func_8002EBCC(&enExItem->actor, play, 0);
func_8002ED80(&enExItem->actor, play, 0);
EnItem00_CustomItemsParticles(&enExItem->actor, play, randoGetItem);
GetItemEntry_Draw(play, randoGetItem);
@ -412,6 +413,8 @@ void EnItem00_DrawRandomizedItem(EnItem00* enItem00, PlayState* play) {
enItem00->actor.params != ITEM00_SOH_GIVE_ITEM_ENTRY) {
randoItem = GET_ITEM_MYSTERY;
}
func_8002EBCC(&enItem00->actor, play, 0);
func_8002ED80(&enItem00->actor, play, 0);
EnItem00_CustomItemsParticles(&enItem00->actor, play, randoItem);
GetItemEntry_Draw(play, randoItem);
}
@ -421,6 +424,8 @@ void ItemBHeart_DrawRandomizedItem(ItemBHeart* itemBHeart, PlayState* play) {
if (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0)) {
randoItem = GET_ITEM_MYSTERY;
}
func_8002EBCC(&itemBHeart->actor, play, 0);
func_8002ED80(&itemBHeart->actor, play, 0);
EnItem00_CustomItemsParticles(&itemBHeart->actor, play, randoItem);
GetItemEntry_Draw(play, randoItem);
}

View File

@ -997,6 +997,12 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
EnItem00* this = (EnItem00*)thisx;
f32 mtxScale;
// Setup Hilites for 3D drops
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
func_8002EBCC(&this->actor, play, 0);
func_8002ED80(&this->actor, play, 0);
}
if (!(this->unk_156 & this->unk_158)) {
switch (this->actor.params) {
case ITEM00_RUPEE_GREEN:

View File

@ -389,6 +389,9 @@ void EnExRuppy_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
func_8002EBCC(&this->actor, play, 0);
func_8002ED80(&this->actor, play, 0);
// purple/gold rupees need less scaling
f32 mtxScale = this->colorIdx >= 3 ? 17.5f : 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);

View File

@ -481,6 +481,9 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0)) {
func_8002EBCC(&this->actor, play, 0);
func_8002ED80(&this->actor, play, 0);
// purple/gold/silver rupees need less scaling
f32 mtxScale = this->colorIdx >= 3 ? 17.5f : 25.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);

View File

@ -1428,6 +1428,9 @@ void EnGirlA_Draw(Actor* thisx, PlayState* play) {
}
if (this->actor.params == SI_RANDOMIZED_ITEM) {
// Set all hilites for randomized items
func_80A3C498(&this->actor, play, 0);
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
GetItemEntry getItemEntry = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && this->actor.params == SI_RANDOMIZED_ITEM) ? GetItemMystery() :
Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);