mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-13 06:58:03 -05:00
Extends GetItemEntry to include GID.
This allows for using it later when drawing freestanding items. Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943168136
This commit is contained in:
parent
11db45eef6
commit
58c9f64a16
@ -7,7 +7,7 @@
|
||||
#define CHEST_ANIM_LONG 1
|
||||
|
||||
#define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim, modIndex, getItemId) \
|
||||
{ itemId, field, (chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1), textId, objectId, modIndex, getItemId }
|
||||
{ itemId, field, (chestAnim != CHEST_ANIM_SHORT ? 1 : -1) * (drawId + 1), textId, objectId, modIndex, getItemId, drawId }
|
||||
|
||||
#define GET_ITEM_NONE \
|
||||
{ ITEM_NONE, 0, 0, 0, 0, 0, 0 }
|
||||
@ -20,4 +20,5 @@ typedef struct {
|
||||
/* 0x04 */ uint16_t objectId;
|
||||
/* 0x06 */ uint16_t modIndex; // 0 = Vanilla, 1 = Randomizer, future mods will increment up?
|
||||
/* 0x08 */ uint16_t getItemId;
|
||||
} GetItemEntry; // size = 0x08
|
||||
/* 0x10 */ uint16_t gid; // Stores the GID value unmodified for future reference.
|
||||
} GetItemEntry; // size = 0x10
|
||||
|
@ -1338,7 +1338,7 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi) - 1);
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
} else {
|
||||
s32 texIndex = this->actor.params - 3;
|
||||
|
||||
@ -1397,7 +1397,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItemEntry =
|
||||
Randomizer_GetRandomizedItem(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi) - 1);
|
||||
GetItem_Draw(globalCtx, randoGetItemEntry.gid);
|
||||
} else {
|
||||
s32 pad;
|
||||
|
||||
|
@ -533,7 +533,7 @@ void EnExItem_DrawHeartPiece(EnExItem* this, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItem =
|
||||
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem);
|
||||
GetItem_Draw(globalCtx, ABS(randoGetItem.gi) - 1);
|
||||
GetItem_Draw(globalCtx, randoGetItem.gid);
|
||||
} else {
|
||||
GetItem_Draw(globalCtx, GID_HEART_PIECE);
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
GetItem_Draw(globalCtx, ABS(Randomizer_GetRandomizedItem(
|
||||
GI_HEART_CONTAINER_2, this->actor.id,this->actor.params, globalCtx->sceneNum).gi) - 1);
|
||||
GetItem_Draw(globalCtx, Randomizer_GetRandomizedItem(GI_HEART_CONTAINER_2,
|
||||
this->actor.id,this->actor.params, globalCtx->sceneNum).gid);
|
||||
} else {
|
||||
if (flag) {
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
@ -233,7 +233,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
|
||||
GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, globalCtx);
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem);
|
||||
if (randoGetItem.itemId != RG_NONE) {
|
||||
GetItem_Draw(globalCtx, ABS(randoGetItem.gi) - 1);
|
||||
GetItem_Draw(globalCtx, randoGetItem.gid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -257,7 +257,7 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItem);
|
||||
|
||||
if (randoGetItem.itemId != RG_NONE) {
|
||||
this->giDrawId = ABS(randoGetItem.gi) - 1;
|
||||
this->giDrawId = randoGetItem.gid;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user