Fixes rendering of treasure chest game items.

This commit is contained in:
Christopher Leggett 2022-08-20 18:00:44 -04:00
parent a67c6b9e67
commit 4dff1443a6
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
3 changed files with 4 additions and 7 deletions

View File

@ -6078,7 +6078,7 @@ s16 GetChestGameRandoGiDrawId(s8 room, s16 ogDrawId, GlobalContext* globalCtx) {
GetItemEntry randoGetItem = GetChestGameRandoGetItem(room, ogDrawId, globalCtx); GetItemEntry randoGetItem = GetChestGameRandoGetItem(room, ogDrawId, globalCtx);
if (randoGetItem.itemId != RG_NONE) { if (randoGetItem.itemId != RG_NONE) {
return ABS(randoGetItem.gi) - 1; return randoGetItem.gid;
} }
return ogDrawId; return ogDrawId;

View File

@ -139,9 +139,7 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
this->unk_17C = func_8002EBCC; this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
this->giDrawId = this->giDrawId =
ABS(Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20) Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20).gid;
.gi) -
1;
} else { } else {
this->giDrawId = GID_BOMB_BAG_30; this->giDrawId = GID_BOMB_BAG_30;
} }
@ -175,8 +173,7 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
case EXITEM_BOMBCHUS_BOWLING: case EXITEM_BOMBCHUS_BOWLING:
this->unk_17C = func_8002EBCC; this->unk_17C = func_8002EBCC;
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
this->giDrawId = this->giDrawId = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10).gid;
ABS(Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10).gi) - 1;
} else { } else {
this->giDrawId = GID_BOMBCHU; this->giDrawId = GID_BOMBCHU;
} }

View File

@ -232,7 +232,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
if(gSaveContext.n64ddFlag && globalCtx->sceneNum == 16) { if(gSaveContext.n64ddFlag && globalCtx->sceneNum == 16) {
GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, globalCtx); GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, globalCtx);
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem);
if (randoGetItem.itemId != RG_NONE) { if (randoGetItem.itemId != ITEM_NONE) {
GetItem_Draw(globalCtx, randoGetItem.gid); GetItem_Draw(globalCtx, randoGetItem.gid);
return; return;
} }